update homepage detail

hmxc
小赖 4 years ago
parent a2f8e554b6
commit 88148a5227

@ -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<HomePage> {
///bar
Widget _menuButton(String assetPath, String text, Widget page) {
final appProvider = Provider.of<AppProvider>(context);
return Expanded(
child: AkuButton(
radius: 8.w,
@ -37,9 +39,10 @@ class _HomePageState extends State<HomePage> {
onPressed: () {
final userProvider =
Provider.of<UserProvider>(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(

@ -69,7 +69,6 @@ class _LoginPageState extends State<LoginPage> {
Container(
width: double.infinity,
child: TextField(
autofocus: true,
controller: _textController,
onChanged: (text) {
setState(() {});

@ -33,7 +33,7 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
_descriptionController?.dispose();
_materialController?.dispose();
_materialPriceController?.dispose();
_materialPriceController?.dispose();
_humanController?.dispose();
super.dispose();
}

Loading…
Cancel
Save