removeData static method

Future<bool> removeData({
  1. required String key,
})

Remove data with key.

Implementation

static Future<bool> removeData({required String key}) async {
  final prefs = await SharedPreferences.getInstance();
  await prefs.reload();
  final prefsKey = _kPrefsKeyPrefix + key;

  return prefs.remove(prefsKey);
}