InApp class
Annotates a field for in-memory storage only.
Best for: Transient states, caches that should reset on app restart, or sensitive data that should never touch the disk. Storage: Memory (RAM). Disappears when the process is killed.
Scenario: Session Data
@GeneratePreferences()
class SessionPrefs extends BasePreferences with _$SessionPrefs {
@InApp()
late final bool _isTempFeatureEnabled = false;
}
Constructors
- InApp()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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