SettingsEntry class
Allow you to defined additional properties on an abstract getter of a SettingsGroup.
This annotation is not required, as all abstract getters of a class annotated with SettingsGroup will get generated implementations. However, sometimes you need to tweak the generated code. That is where this annotation comes into play.
- Annotations
-
- @Target({TargetKind.getter})
Constructors
- SettingsEntry({String? key, dynamic defaultValue, Function? toSettings, Function? fromSettings})
-
Default constructor.
const
Properties
- defaultValue → dynamic
-
A custom default value.
final
- fromSettings → Function?
-
A custom converter to transform a settings compatible value to a value
of the getters return type.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String?
-
A custom key to be used as the key for the shared preferences.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toSettings → Function?
-
A custom converter to transform a value of the getters return type to a
settings compatible value.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited