|
|
@ -1,4 +1,5 @@
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
|
import 'package:aku_community_manager/style/app_style.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/tools/widget_tool.dart';
|
|
|
|
import 'package:aku_ui/aku_ui.dart';
|
|
|
|
import 'package:aku_ui/aku_ui.dart';
|
|
|
|
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
|
|
|
import 'package:aku_ui/common_widgets/aku_material_button.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
@ -12,12 +13,14 @@ class HomePage extends StatefulWidget {
|
|
|
|
_HomePageState createState() => _HomePageState();
|
|
|
|
_HomePageState createState() => _HomePageState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//自定义bar的菜单按钮
|
|
|
|
Widget _menuButton(IconData iconData, String text, Widget page) {
|
|
|
|
Widget _menuButton(IconData iconData, String text, Widget page) {
|
|
|
|
return AkuButton(
|
|
|
|
return AkuButton(
|
|
|
|
height: 75.w + 8.w + 33.w,
|
|
|
|
height: 75.w + 8.w + 33.w,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
Get.to(page);
|
|
|
|
Get.to(page);
|
|
|
|
},child: Column(
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
iconData,
|
|
|
|
iconData,
|
|
|
@ -33,7 +36,41 @@ Widget _menuButton(IconData iconData, String text,Widget page) {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),);
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//底部信息栏卡片
|
|
|
|
|
|
|
|
Widget _card(String number, String text, Color color) {
|
|
|
|
|
|
|
|
return AkuButton(
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
color: Color(0xFFFFFFFF),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
width: 342.5.w,
|
|
|
|
|
|
|
|
height: 166.w,
|
|
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 32.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
number,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: color, fontSize: 40.sp, fontStyle: FontStyle.italic),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 16.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(text,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
@ -41,8 +78,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ScreenUtil.init(context,
|
|
|
|
ScreenUtil.init(context,
|
|
|
|
designSize: Size(750, 1334), allowFontScaling: true);
|
|
|
|
designSize: Size(750, 1334), allowFontScaling: true);
|
|
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
|
|
|
|
drawer: Drawer(),
|
|
|
|
|
|
|
|
backgroundColor: Color(0xFFF9F9F9),
|
|
|
|
|
|
|
|
//自定义bar
|
|
|
|
appBar: PreferredSize(
|
|
|
|
appBar: PreferredSize(
|
|
|
|
preferredSize: Size(375.w, 430.w - 40.w + ScreenUtil().statusBarHeight),
|
|
|
|
preferredSize: Size(375.w, 430.w - 40.w + ScreenUtil().statusBarHeight),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
@ -73,21 +112,27 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
margin: EdgeInsets.only(top: 8.w, bottom: 8.w),
|
|
|
|
margin: EdgeInsets.only(top: 8.w, bottom: 8.w),
|
|
|
|
width: 72.w,
|
|
|
|
width: 72.w,
|
|
|
|
height: 72.w,
|
|
|
|
height: 72.w,
|
|
|
|
child: AkuRoundButton(
|
|
|
|
|
|
|
|
//头像按钮
|
|
|
|
//头像按钮
|
|
|
|
|
|
|
|
child: Builder(builder: (BuildContext context) {
|
|
|
|
|
|
|
|
return AkuRoundButton(
|
|
|
|
height: 36.w,
|
|
|
|
height: 36.w,
|
|
|
|
onPressed: () {},
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
Scaffold.of(context).openDrawer();
|
|
|
|
|
|
|
|
},
|
|
|
|
child: CircleAvatar(radius: 36.w),
|
|
|
|
child: CircleAvatar(radius: 36.w),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
})),
|
|
|
|
SizedBox(width: 16.w),
|
|
|
|
SizedBox(width: 16.w),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(top: 8.w, bottom: 8.w),
|
|
|
|
margin: EdgeInsets.only(top: 8.w, bottom: 8.w),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
height: 72.w,
|
|
|
|
height: 72.w,
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 21.w),
|
|
|
|
|
|
|
|
child: AkuButton(
|
|
|
|
|
|
|
|
//搜索框按钮
|
|
|
|
color: Color(0xFFFFFFFF),
|
|
|
|
color: Color(0xFFFFFFFF),
|
|
|
|
padding: EdgeInsets.only(left: 21.w, right: 87.w),
|
|
|
|
onPressed: () {},
|
|
|
|
child: Row(children: [
|
|
|
|
child: Row(children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
@ -101,23 +146,17 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 19.w),
|
|
|
|
SizedBox(width: 19.w),
|
|
|
|
Expanded(
|
|
|
|
Text(
|
|
|
|
child: AkuButton(
|
|
|
|
|
|
|
|
//搜索框按钮
|
|
|
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
'搜索工单订单号、手机',
|
|
|
|
'搜索工单订单号、手机',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
SizedBox(width: 15.w),
|
|
|
|
SizedBox(width: 15.w),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: 5.w, bottom: 5.w),
|
|
|
|
margin: EdgeInsets.only(top: 5.w, bottom: 5.w),
|
|
|
@ -206,6 +245,132 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
body: ListView(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
//公告标题行
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: 45.w,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'今日公告',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
|
|
|
|
fontSize: 32.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
AkuButton(
|
|
|
|
|
|
|
|
//全部公告按钮
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'全部公告',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Icon(
|
|
|
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
|
|
|
size: 22.w,
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
|
|
|
|
//公告栏
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
color: Color(0xFFFFFFFF),
|
|
|
|
|
|
|
|
//公告栏
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: 172.w,
|
|
|
|
|
|
|
|
//TODO listview
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 32.w),
|
|
|
|
|
|
|
|
//待办事项标题行
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: 45.w,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'待办事项',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
|
|
|
|
fontSize: 32.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
AkuButton(
|
|
|
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
'全部事项',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Icon(
|
|
|
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
|
|
|
size: 22.w,
|
|
|
|
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
|
|
|
|
//待办事项栏
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: 449.w,
|
|
|
|
|
|
|
|
//TODO listview
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 24.w),
|
|
|
|
|
|
|
|
//底部信息栏
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
// height: 333.w,
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
_card('25', '未处理事项', Color(0xFFFF4E0D)),
|
|
|
|
|
|
|
|
AkuDiveder().verticalDivider(166.5.w),
|
|
|
|
|
|
|
|
_card('22', '处理中事项', Color(0xFFFFC40C)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AkuDiveder().horizontalDivider(343.w),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
_card('25', '已处理事项', Color(0xFF3F8FFE)),
|
|
|
|
|
|
|
|
AkuDiveder(isReverse: true).verticalDivider(
|
|
|
|
|
|
|
|
166.5.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
_card('72', '全部事项', Color(0xFF333333)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|