readBool method
Implementation
Future<bool> readBool(String key, {bool defaultValue = false}) async {
if (useSecure) {
final val = await _secureStorage.read(key: key);
if (val == null) return defaultValue;
return val.toLowerCase() == 'true';
} else {
final prefs = await SharedPreferences.getInstance();
return prefs.getBool(key) ?? defaultValue;
}
}