setBoolAsync static method

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

Sets a boolean value and returns a Future that completes when the write is done.

Implementation

static Future<bool> setBoolAsync(String key, bool value) async {
  _ensureInitialized();
  return await _prefs!.setBool(key, value);
}