Commit c5ed99344082f61cf293ab453e7f990d31e26d6d
1 parent
398c987d
为清除缓存添加提示
Showing
1 changed file
with
9 additions
and
1 deletions
lib/pages/user/setting/setting_page.dart
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter_easyloading/flutter_easyloading.dart'; | ||
| 2 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 3 | import 'package:package_info_plus/package_info_plus.dart'; | 4 | import 'package:package_info_plus/package_info_plus.dart'; |
| 4 | import 'package:wow_english/common/widgets/we_app_bar.dart'; | 5 | import 'package:wow_english/common/widgets/we_app_bar.dart'; |
| 6 | +import 'package:wow_english/utils/toast_util.dart'; | ||
| 5 | 7 | ||
| 6 | import '../../../route/route.dart'; | 8 | import '../../../route/route.dart'; |
| 7 | 9 | ||
| @@ -49,7 +51,13 @@ class SettingPageState extends State<SettingPage> { | @@ -49,7 +51,13 @@ class SettingPageState extends State<SettingPage> { | ||
| 49 | pushNamed(AppRouteName.deleteAccount); | 51 | pushNamed(AppRouteName.deleteAccount); |
| 50 | }), | 52 | }), |
| 51 | 12.verticalSpace, | 53 | 12.verticalSpace, |
| 52 | - _buildItemWidget('清除缓存', onPress: () {}), | 54 | + _buildItemWidget('清除缓存', onPress: () { |
| 55 | + EasyLoading.show(); | ||
| 56 | + Future.delayed(const Duration(seconds: 1), (){ | ||
| 57 | + showToast("清除成功"); | ||
| 58 | + EasyLoading.dismiss(); | ||
| 59 | + }); | ||
| 60 | + }), | ||
| 53 | 12.verticalSpace, | 61 | 12.verticalSpace, |
| 54 | _buildItemWidget('帮助与反馈', onPress: () { | 62 | _buildItemWidget('帮助与反馈', onPress: () { |
| 55 | pushNamed(AppRouteName.reBack); | 63 | pushNamed(AppRouteName.reBack); |