getBool method

Future<bool> getBool(
  1. String key, {
  2. bool defValue = false,
})

Implementation

Future<bool> getBool(String key, {bool defValue = false}) async{
  SharedPreferences pref = _pref!;
  bool value = pref.getBool(key) ?? defValue;
  return value;
}