PrfVariable<T> constructor

PrfVariable<T>(
  1. String key,
  2. SharedPrefsGetter<T> _getter,
  3. SharedPrefsSetter<T> _setter,
  4. T? defaultValue,
)

Creates a new PrfVariable with the specified key, getter, setter, and optional defaultValue.

The key must be unique within your application's SharedPreferences storage. The _getter and _setter functions handle the actual reading and writing to storage.

Implementation

PrfVariable(this.key, this._getter, this._setter, this.defaultValue);