readBool static method

Future<bool> readBool(
  1. String key, [
  2. bool defaultValue = false
])

Implementation

static Future<bool> readBool(String key, [bool defaultValue = false]) async {
  final prefs = await SharedPreferences.getInstance();
  return prefs.getBool(key) ?? defaultValue;
}