From 719a23283b05a1eee725c9e09115b34931b5d186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Tue, 30 Mar 2021 19:04:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98=E6=B8=85?= =?UTF-8?q?=E6=A5=9A=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/shared_prefe_util.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/util/shared_prefe_util.dart b/lib/util/shared_prefe_util.dart index 729a289..14f7159 100644 --- a/lib/util/shared_prefe_util.dart +++ b/lib/util/shared_prefe_util.dart @@ -49,4 +49,9 @@ class SharedPreferencesUtil { } return defaultVal; } + + static Future clean() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + return await prefs.clear(); + } }