import 'package:shared_preferences/shared_preferences.dart'; /// Handles all persistance related app storage class StorageHandler { /// Stores the given `data` as a string with the `key`. static Future store(String key, String data) async { final _prefs = await SharedPreferences.getInstance(); _prefs.setString(key, data); return data; } /// Fetches the string related to the given `key`. static Future fetch(String key) async { final _prefs = await SharedPreferences.getInstance(); return _prefs.getString(key); } }