setBool method

Future<void> setBool(
  1. String key, {
  2. required bool value,
})

Saves or overwrites a bool value.

Implementation

Future<void> setBool(String key, {required bool value}) async {
  try {
    await _store.setBool(key, value);
  } catch (e, st) {
    throw StorageException(
      message: 'Failed to set bool',
      key: key,
      cause: e,
      stackTrace: st,
    );
  }
}