getBool method

Future<bool> getBool(
  1. String key
)

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;
  });
}