setValue method

  1. @override
Future<bool> setValue(
  1. T value
)
override

Sets the value of the underlying shared preference.

This will subsequently notify any listeners with the updated value.

Returns true if the value was successfully set, otherwise returns false.

Implementation

@override
Future<bool> setValue(T value) {
  _storedValue = value;
  _updateState();
  return Future.value(true);
}