Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter sharedpreferences clear

// 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');
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter keyboard overflow when opens 
Dart :: materialstateproperty color 
Dart :: text fieldform color flutter 
Dart :: flutter textinput number 
Dart :: how to give shape to card in flutter 
Dart :: how to get whatsapp groups in app flutter programmatically 
Dart :: flutter listtile leading and title space 
Dart :: dismiss keyboard flutter 
Dart :: make scaffold scrollable flutter 
Dart :: dart ceil 
Dart :: dart timer delay 
Dart :: flutter portrait only 
Dart :: get random color in flutter 
Dart :: flutter loading images over network 
Dart :: flutter lock orientation 
Dart :: flutter flip image 
Dart :: dart map foreach 
Dart :: how to add onpressed to a text flutter 
Dart :: get only time from datetime in dart 
Dart :: change password firebase flutter 
Dart :: convert a list to string in flutter 
Dart :: flutter list tile 
Dart :: listview inside column flutter 
Dart :: get index of element in map dart 
Dart :: dart custom exception 
Dart :: flutter int max value 
Dart :: flutter appbar default padding 
Dart :: dart read csv files 
Dart :: bitmapdescriptor flutter 
Dart :: flutter cupertinoapp 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =