update method

Future<void> update(
  1. T value
)

Updates the value asynchronously.

Implementation

Future<void> update(T value) async {
  await prefs.setString(prefKey, mapTo(value));
  super.state = value;
}