Prf class abstract

Core service class that manages SharedPreferences initialization and access.

This abstract class cannot be instantiated directly and provides static methods to safely access the SharedPreferences instance.

The class implements:

  • Lazy initialization (SharedPreferences are only loaded when first needed)
  • Caching (the instance is stored after first retrieval)
  • Thread-safety (initialization is protected against race conditions)

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

Static Properties

isInitialized bool
Checks if SharedPreferences has been initialized.
no setter
maybePrefs → SharedPreferences?
Provides synchronous access to the cached SharedPreferences instance.
no setter

Static Methods

getInstance() Future<SharedPreferences>
Gets the SharedPreferences instance, initializing it if necessary.
reset() → void
Resets the cached SharedPreferences instance and initialization state.