deleteValue method
- String key
Delete variable with the key key
Return result
in bool
after removing the variable in Share Preference
Implementation
Future<bool> deleteValue(String key) async {
final SharedPreferences prefs = await _prefs;
bool result = await prefs.remove(key);
return result;
}