From b166af87671dfad58fe36d2ba540ae089f9a0bda Mon Sep 17 00:00:00 2001 From: orz12 Date: Sat, 2 Mar 2024 12:52:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/about/index.dart | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index 47c06e96..90598519 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -173,6 +173,36 @@ class _AboutPageState extends State { title: const Text('清除缓存'), subtitle: Text('图片及网络缓存 $cacheSize', style: subTitleStyle), ), + ListTile( + title: const Text('重置所有设置'), + onTap: () { + SmartDialog.show( + useSystem: true, + builder: (BuildContext context) { + return AlertDialog( + title: const Text('重置所有设置'), + content: const Text('是否重置所有设置?'), + actions: [ + TextButton( + onPressed: () { + SmartDialog.dismiss(); + }, + child: const Text('取消'), + ), + TextButton( + onPressed: () { + GStrorage.setting.clear(); + SmartDialog.showToast('重置成功'); + SmartDialog.dismiss(); + }, + child: const Text('确定'), + ), + ], + ); + }, + ); + }, + ) ], ), );