removeValue static method

Future<void> removeValue(
  1. String key
)

Removes a value from shared preferences.

Implementation

static Future<void> removeValue(String key) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  await prefs.remove(key);
}