getBool method
It retrieves a bool value from the localStorage. It returns a false value if this value is not present
Implementation
Future<bool> getBool(String key) async {
return _prefs.then((SharedPreferences prefs) {
return prefs.getBool(key) ?? false;
});
}