add decoration page

hmxc
小赖 4 years ago
parent 68eb7c52a4
commit ddcd31654b

@ -18,16 +18,26 @@ class UserInfoModel {
String nickName;
File avatar;
USER_ROLE role;
String phone;
String get securePhone {
if (phone.length < 8)
return phone;
else
return '${phone.substring(0, 3)}****${phone.substring(7)}';
}
UserInfoModel({
this.nickName,
this.avatar,
this.role,
this.phone,
});
UserInfoModel.empty({
this.nickName = '',
this.avatar,
this.role = USER_ROLE.EMPTY,
this.phone = '',
});
///
@ -36,6 +46,7 @@ class UserInfoModel {
this.nickName = '李管家',
this.avatar,
this.role = USER_ROLE.MANAGER,
this.phone = '18819289976',
});
///
@ -44,6 +55,7 @@ class UserInfoModel {
this.nickName = '王师傅',
this.avatar,
this.role = USER_ROLE.FIXER,
this.phone = '18927139123',
});
///
@ -52,5 +64,6 @@ class UserInfoModel {
this.nickName = '林保安',
this.avatar,
this.role = USER_ROLE.SECURITY,
this.phone = '13918237877',
});
}

@ -1,6 +1,5 @@
import 'dart:io';
import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
import 'package:flutter/material.dart';

@ -1,5 +1,6 @@
import 'package:aku_community_manager/ui/manage_pages/green_manage_page.dart';
import 'package:aku_community_manager/ui/sub_pages/activity_manager/activity_manager_page.dart';
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_page.dart';
import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart';
import 'package:aku_ui/common_widgets/aku_material_button.dart';
import 'package:flutter/material.dart';
@ -49,9 +50,11 @@ class _ApplicationPageState extends State<ApplicationPage>
AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, Scaffold()),
AppApplication('问卷调查', '', Scaffold()),
];
List<AppApplication> _wisdomApplications=[
List<AppApplication> _wisdomApplications = [
AppApplication('绿化管理', R.ASSETS_HOME_IC_GREENING_PNG, GreenManagePage()),
];
AppApplication(
'装修管理', R.ASSETS_HOME_IC_DECORATION_PNG, DecorationManagerPage()),
];
@override
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);

@ -275,17 +275,25 @@ class _HomePageState extends State<HomePage> {
]),
),
SizedBox(height: 24.w),
Container(
GestureDetector(
onTap: () {
if (!userProvider.isSigned) Get.to(LoginPage());
},
child: Container(
margin: EdgeInsets.only(
left: 32.w,
),
height: 67.w,
child: Text(
'HI李大海',
userProvider.isSigned
? 'HI${userProvider.userInfoModel.nickName}'
: '登录/注册',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontWeight: FontWeight.bold,
fontSize: 48.sp),
fontSize: 48.sp,
),
),
),
),
SizedBox(height: 16.w),

@ -50,6 +50,7 @@ class _UserInfoPageState extends State<UserInfoPage> {
AkuTile(
onTap: () {},
title: Text('手机'),
suffix: Text(userProvider.userInfoModel.securePhone),
),
],
),

@ -0,0 +1,18 @@
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:flutter/material.dart';
class DecorationManagerPage extends StatefulWidget {
DecorationManagerPage({Key key}) : super(key: key);
@override
_DecorationManagerPageState createState() => _DecorationManagerPageState();
}
class _DecorationManagerPageState extends State<DecorationManagerPage> {
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '装修管理',
);
}
}
Loading…
Cancel
Save