shared_prefs_typed_annotations 0.7.0
shared_prefs_typed_annotations: ^0.7.0 copied to clipboard
Annotations for generating type-safe SharedPreferences code (shared_prefs_typed)
Changelog #
All notable changes to this package will be documented in this file.
0.7.0 #
New #
@PrefKey(String key)— field-level annotation to override the SharedPreferences storage key. Added@Target({TargetKind.field}).@PrefDateTime(DateTimeEncoding encoding)— field-level annotation to specify how aDateTimefield is encoded in storage. Added@Target({TargetKind.field}).DateTimeEncodingenum — two variants:millisecondsSinceEpoch(stored asint) andiso8601(stored asString).generateInterfaceparameter added toTypedPrefs— whentrue, the generator also produces an abstract{ClassName}Baseinterface.
0.6.0 #
- Added
@Target({TargetKind.classType})toTypedPrefs— misuse on non-class declarations now produces an IDE-level error - Added
metaas a dependency - Improved class-level documentation (documents the
_prefix requirement)
0.5.2 #
- Fixed supported platforms
0.5.1 #
- Added example file
0.5.0 #
- Initial stable release.
- Provides the
@TypedPrefsannotation with the optionalasyncboolean parameter to control the generator's output mode.