Question : flutter sharedpreferences clear
Answered by : idan-biton
// You can simply use clear() function with your variable it
// will clear all the shared preferences.
SharedPreferences preferences = await SharedPreferences.getInstance();
await preferences.clear();
// If you want to remove particular key value from
// share preferences with key name you can do it like this way as follows.
SharedPreferences preferences = await SharedPreferences.getInstance();
await preferences.remove('KeyNameHere');
Source : https://stackoverflow.com/questions/54327164/flutter-remove-all-saved-shared-preferences | Last Update : Thu, 03 Feb 22