Last active
January 11, 2020 19:09
-
-
Save ashishrawat2911/2bc3d85c0a31bd1c2bf9009a8f865f88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getStringValuesSF() async { | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
//Return String | |
String stringValue = prefs.getString('stringValue'); | |
return stringValue; | |
} | |
getBoolValuesSF() async { | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
//Return bool | |
bool boolValue = prefs.getBool('boolValue'); | |
return boolValue; | |
} | |
getIntValuesSF() async { | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
//Return int | |
int intValue = prefs.getInt('intValue'); | |
return intValue; | |
} | |
getDoubleValuesSF() async { | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
//Return double | |
double doubleValue = prefs.getDouble('doubleValue'); | |
return doubleValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment