getBool static method

Future<bool> getBool(
  1. String key
)

Implementation

static Future<bool> getBool(String key) async {
  SharedPreferences prefs = await SharedPreferences.getInstance();
  bool result = prefs.getBool(key) ?? false;
  return result;

}