deleteKey static method

Future deleteKey(
  1. String key, [
  2. dynamic takeAction
])

Implementation

static Future deleteKey(String key, [dynamic takeAction]) async {
  final SharedPreferences sharedPreferences =
      await SharedPreferences.getInstance();
  await sharedPreferences.remove(key).whenComplete(() => takeAction);
}