getBool method
Implementation
Future<bool> getBool(String prefKey) async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
Pref? p = getPref(prefKey);
if (p == null) {
return false;
} else {
return prefs.getBool(prefKey) ??
p.defVal.toString().toLowerCase() == 'true';
}
}