import 'package:shared_preferences/shared_preferences.dart'; class Storage { static Future setString(String key, String value) async { SharedPreferences sp = await SharedPreferences.getInstance(); sp.setString(key, value); } static Future getString(String key) async { SharedPreferences sp = await SharedPreferences.getInstance(); return sp.getString(key); } static Future setInt(String key, int value) async { SharedPreferences sp = await SharedPreferences.getInstance(); sp.setInt(key, value); } static Future getInt(String key) async { SharedPreferences sp = await SharedPreferences.getInstance(); return sp.getInt(key); } static Future setBool(String key, bool value) async { SharedPreferences sp = await SharedPreferences.getInstance(); sp.setBool(key, value); } static Future getBool(String key) async { SharedPreferences sp = await SharedPreferences.getInstance(); return sp.getBool(key); } static Future remove(String key) async { SharedPreferences sp = await SharedPreferences.getInstance(); sp.remove(key); } static Future clear() async { SharedPreferences sp = await SharedPreferences.getInstance(); sp.clear(); } }