flutter_tipkit_shared_preferences 0.1.0
flutter_tipkit_shared_preferences: ^0.1.0 copied to clipboard
A shared_preferences datastore for flutter_tipkit, so tip state survives app restarts.
flutter_tipkit_shared_preferences #
A shared_preferences datastore for flutter_tipkit, so tip state survives app restarts.
await Tips.configure(
datastore: SharedPreferencesTipDatastore.async(SharedPreferencesAsync()),
);
// Or, with the cached API:
final preferences = await SharedPreferences.getInstance();
await Tips.configure(datastore: SharedPreferencesTipDatastore(preferences));
Each tip, parameter and event is one JSON string under a key starting with
tipkit. (change it with keyPrefix). Tips.resetDatastore() removes only
those keys. Entries that cannot be read are skipped.