setBool method

  1. @override
Future<void> setBool(
  1. String key,
  2. bool? value
)
override

Method to set boolean value to the storage, value can be null according to the support by underlying storage system.

Example code(SharedPreferences Implementation): /// ```dart Future

Implementation

@override
Future<void> setBool(String key, bool? value) async {
  await _preferences?.setBool(key, value ?? false);
}