From 7bda8f087f51458e3e2e0ed8758d822cb8c4c553 Mon Sep 17 00:00:00 2001 From: wylyl22 <2373073266@qq.com> Date: Mon, 5 Sep 2022 08:34:34 +0800 Subject: [PATCH] 9.5 --- lib/ui/home/home_page.dart | 1 + lib/ui/user/user_page.dart | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 92a1f36..2e92434 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -24,6 +24,7 @@ class HomePage extends StatefulWidget { bool sms = false; bool plone = false; bool kg=false; + final service = FlutterBackgroundService(); @override class _HomePageState extends State with WidgetsBindingObserver { diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index 6f30052..f3441d2 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -44,11 +44,11 @@ class _UserPageState extends State { final userProvider = Provider.of(Get.context!, listen: false); bool isVip = false; - String? endDate; + DateTime? _lastTap; late bool vle = false; final service = FlutterBackgroundService(); final EasyRefreshController _easyRefreshController = EasyRefreshController(); - + String? endDate; @override void dispose() { _easyRefreshController.dispose(); @@ -85,6 +85,7 @@ class _UserPageState extends State { @override Widget build(BuildContext context) { + return CloudScaffold( systemStyle: const SystemUiOverlayStyle( statusBarIconBrightness: Brightness.dark, @@ -351,7 +352,6 @@ class _UserPageState extends State { ], ); } - //内容 _getSwitch2() { return Container( @@ -381,6 +381,7 @@ class _UserPageState extends State { // await prefs.setBool("kg", value); // print("这是数据${prefs.getBool("kg")}"); setState(() { + if (isVip) { vle = value; // prefs.setBool("kg", vle); @@ -414,7 +415,8 @@ class _UserPageState extends State { } else { BotToast.showText(text: "还没有开通会员,不可使用该功能"); } - }); + } + ); }), )); }