diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index a2b4bfc..a900a26 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -1,4 +1,5 @@ import 'package:aku_community_manager/const/resource.dart'; +import 'package:aku_community_manager/provider/app_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/tools/screen_tool.dart'; @@ -30,6 +31,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { ///自定义bar的菜单按钮 Widget _menuButton(String assetPath, String text, Widget page) { + final appProvider = Provider.of(context); return Expanded( child: AkuButton( radius: 8.w, @@ -37,9 +39,10 @@ class _HomePageState extends State { onPressed: () { final userProvider = Provider.of(context, listen: false); - if (userProvider.isSigned) + if (userProvider.isSigned) { Get.to(page); - else + appProvider.addRecentApp(AppApplication(text, assetPath, page)); + } else Get.to(LoginPage()); }, child: Column( diff --git a/lib/ui/login/login_page.dart b/lib/ui/login/login_page.dart index 47e1dff..70705cf 100644 --- a/lib/ui/login/login_page.dart +++ b/lib/ui/login/login_page.dart @@ -69,7 +69,6 @@ class _LoginPageState extends State { Container( width: double.infinity, child: TextField( - autofocus: true, controller: _textController, onChanged: (text) { setState(() {}); diff --git a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart index 54b3a71..53a909d 100644 --- a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart +++ b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart @@ -33,7 +33,7 @@ class _FixWorkFinishPageState extends State { _descriptionController?.dispose(); _materialController?.dispose(); _materialPriceController?.dispose(); - _materialPriceController?.dispose(); + _humanController?.dispose(); super.dispose(); }