setBool method

Future<bool> setBool(
  1. String key,
  2. bool value
)

Saves a boolean value to persistent storage in the background.

Returns false if the platform implementation can definitively determine that storing the preference failed. A return value of true indicates either that the value was written successfully, or that the underlying platform API does not report success or failure.

Implementation

Future<bool> setBool(String key, bool value) => _setValue('Bool', key, value);