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/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/provider/user_provider.dart';
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/tools/screen_tool.dart'; import 'package:aku_community_manager/tools/screen_tool.dart';
@ -30,6 +31,7 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
///bar ///bar
Widget _menuButton(String assetPath, String text, Widget page) { Widget _menuButton(String assetPath, String text, Widget page) {
final appProvider = Provider.of<AppProvider>(context);
return Expanded( return Expanded(
child: AkuButton( child: AkuButton(
radius: 8.w, radius: 8.w,
@ -37,9 +39,10 @@ class _HomePageState extends State<HomePage> {
onPressed: () { onPressed: () {
final userProvider = final userProvider =
Provider.of<UserProvider>(context, listen: false); Provider.of<UserProvider>(context, listen: false);
if (userProvider.isSigned) if (userProvider.isSigned) {
Get.to(page); Get.to(page);
else appProvider.addRecentApp(AppApplication(text, assetPath, page));
} else
Get.to(LoginPage()); Get.to(LoginPage());
}, },
child: Column( child: Column(

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

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

Loading…
Cancel
Save