persistentState<T> function

WhalePod<T> persistentState<T>(
  1. String key,
  2. T defaultValue
)

The simplest way to declare automatically persisting state using SharedPreferences. It syncs changes asynchronously without halting the UI thread! Note: Call await WhaleStorage.init(); in main() before declaring!

Implementation

WhalePod<T> persistentState<T>(String key, T defaultValue) {
  return PersistentPod<T>(key, defaultValue);
}