getBool method

  1. @override
Future<bool?> getBool(
  1. String key, {
  2. SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions(),
})
override

Reads a boolean value for key.

Implementation

@override
Future<bool?> getBool(
  String key, {
  SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions(),
}) async {
  final value = (await getAll(options: options))[key];
  return value is bool ? value : null;
}