Guest User

Untitled

a guest
Oct 16th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Future<String> load(SharedPreferences prefs, String fileName) async {
  2. prefs = await SharedPreferences.getInstance();
  3. String jsonString = prefs.getString(fileName) ?? "";
  4. if (jsonString.isNotEmpty) {
  5. return jsonString;
  6. }else{
  7. return ...
  8. }
  9. }
  10.  
  11. return Future.value('');
Add Comment
Please, Sign In to add comment