StorageManager class
Manages persistent data for the SDK using the platform's local storage.
This manager handles caching of attribution results, the install ID, and the offline event queue to ensure data survives app restarts.
- Implemented types
Constructors
- StorageManager(SharedPreferencesProtocol _prefs)
- Creates a storage manager with the specified SharedPreferencesProtocol
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
-
clearAll(
) → Future< bool> -
Clears all stored SDK data
override
-
getAttribution(
) → String? -
Retrieves the persisted active attribution context (as JSON), or null.
override
-
getInstallData(
) → DeepLinkData? -
Retrieves the saved deep link data
override
-
getInstallId(
) → String? -
Retrieves the saved install ID
override
-
isFirstLaunch(
) → bool -
Checks if this is the first launch of the app
override
-
loadEventQueue(
) → List< EventRequest> -
Loads the event queue from persistent storage
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAttribution(
) → Future< bool> -
Removes the persisted active attribution context.
override
-
saveAttribution(
String json) → Future< bool> -
Persists the active last-click attribution context (as JSON).
override
-
saveEventQueue(
List< EventRequest> events) → Future<bool> -
Saves the event queue to persistent storage
override
-
saveInstallData(
DeepLinkData data) → Future< bool> -
Saves the deep link data from attribution
override
-
saveInstallId(
String installId) → Future< bool> -
Saves the install ID
override
-
setHasLaunched(
) → Future< bool> -
Marks that the app has launched (no longer first launch)
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → Future< StorageManager> - Factory constructor to create a storage manager asynchronously