摘要: shared_preferences 示例 static Future<void> setToken(String token) async { SharedPreferences prefs = await SharedPreferences.getInstance(); await prefs. 阅读全文
posted @ 2022-04-28 16:38 macroK 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 库引用 pubspec.yaml 文件引入 dependencies: json_annotation: <最新版本> dev_dependencies: build_runner: <最新版本> json_serializable: <最新版本> 终端运行 flutter packages get 阅读全文
posted @ 2022-04-28 16:20 macroK 阅读(180) 评论(0) 推荐(0) 编辑