v2.3.1
-
Added
PrfHistory<T>: a reusable persisted history tracker for any type. Supports max length trimming, deduplication, isolation safety, and flexible factory constructors for enums and JSON models. Also added.historyTracker(name)extension onPrfAdapter<List<T>>for simplifiedPrfHistory<T>creation. -
Added
.prf<T>()and.prfCustomAdapter<T>()extensions onStringfor quick and concise variable creation.
final coinsPrf = 'player_coins'.prf<int>(); // works with all types now- Added
.prf(key)extension onPrfAdapter<T>for direct use of custom adapters without boilerplate.
final colorPrf = ColorAdapter().prf('saved_color'); // no need to specify types- Added
Prf.jsonList<T>()for easy creation of cached and isolate-safe preferences for lists of JSON-serializable objects. - Added
Prf.enumeratedList<T>()for type-safe enum list preferences backed by nativeList<int>storage. - Added
JsonListAdapter<T>: stores aList<T>where each item is a JSON string using nativeList<String>support. - Added
EnumListAdapter<T>: stores a list of enums as their integer indices using nativeList<int>support. - Fixed broken or incorrect navigation links in the README.