import 'package:shared_preferences/shared_preferences.dart';// 设置setStorage(String key, value) async { SharedPreferences prefs = await SharedPreferences.getInstance(); if (value is String) { prefs.setString(key, value); } else if (value is num) { prefs.setInt(key, value as int); } else if (value is double) { prefs.setDouble(key, value); } else if (value is bool) { prefs.setBool(key, value); } else if (value is List) { prefs.setStringList(key, value.cast
flutter数据存储封装shared
时间:2023-08-08
上一篇:linux配置JAVA
相关推荐