|
|
@ -5,10 +5,12 @@ import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness
|
|
|
|
import 'package:aku_community_manager/models/manager/item_num_model.dart';
|
|
|
|
import 'package:aku_community_manager/models/manager/item_num_model.dart';
|
|
|
|
import 'package:aku_community_manager/models/todo_bussiness/todo_model.dart';
|
|
|
|
import 'package:aku_community_manager/models/todo_bussiness/todo_model.dart';
|
|
|
|
import 'package:aku_community_manager/models/todo_bussiness/todo_outdoor_model.dart';
|
|
|
|
import 'package:aku_community_manager/models/todo_bussiness/todo_outdoor_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community_manager/tools/user_tool.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/business/bussiness_func.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/business/bussiness_func.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/business/todo_outdoor_card.dart';
|
|
|
|
import 'package:aku_community_manager/ui/home/business/todo_outdoor_card.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/base_list_model.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/base_list_model.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/net_util.dart';
|
|
|
|
import 'package:aku_community_manager/utils/network/net_util.dart';
|
|
|
|
|
|
|
|
import 'package:badges/badges.dart';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
|
|
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
@ -151,12 +153,15 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
statusBarColor: Colors.transparent,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
Future.delayed(Duration(milliseconds: 300), () async {
|
|
|
|
Future.delayed(Duration(milliseconds: 300), () async {
|
|
|
|
_itemNumModel = await _getItemNum();
|
|
|
|
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
|
|
|
var dataList = await BussinessFunc.getBussinessModelList(1);
|
|
|
|
if (userProvider.isLogin) {
|
|
|
|
_todoModelList = dataList.map((e) => ToDoModel.fromJson(e)).toList();
|
|
|
|
_itemNumModel = await _getItemNum();
|
|
|
|
_anounceMentList = await _getAnouncement();
|
|
|
|
var dataList = await BussinessFunc.getBussinessModelList(1);
|
|
|
|
_onload = false;
|
|
|
|
_todoModelList = dataList.map((e) => ToDoModel.fromJson(e)).toList();
|
|
|
|
setState(() {});
|
|
|
|
_anounceMentList = await _getAnouncement();
|
|
|
|
|
|
|
|
_onload = false;
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -182,6 +187,10 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final userProvider = Provider.of<UserProvider>(context);
|
|
|
|
final userProvider = Provider.of<UserProvider>(context);
|
|
|
|
|
|
|
|
final appProvider = Provider.of<AppProvider>(context);
|
|
|
|
|
|
|
|
var loadingWidget = Center(
|
|
|
|
|
|
|
|
child: CircularProgressIndicator(),
|
|
|
|
|
|
|
|
);
|
|
|
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
|
|
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
|
|
|
child: Scaffold(
|
|
|
|
child: Scaffold(
|
|
|
|
drawer: PersonalDraw(),
|
|
|
|
drawer: PersonalDraw(),
|
|
|
@ -261,7 +270,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 19.w),
|
|
|
|
SizedBox(width: 19.w),
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'搜索工单订单号、手机',
|
|
|
|
'搜索应用',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
fontSize: 28.sp,
|
|
|
@ -300,32 +309,40 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
// ]),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
Container(
|
|
|
|
Badge(
|
|
|
|
margin: EdgeInsets.only(top: 5.w, bottom: 5.w),
|
|
|
|
elevation: 0,
|
|
|
|
child: AkuMaterialButton(
|
|
|
|
position: BadgePosition.topEnd(
|
|
|
|
minWidth: 78.w,
|
|
|
|
top: 4,
|
|
|
|
//消息按钮
|
|
|
|
end: 4,
|
|
|
|
height: double.infinity,
|
|
|
|
),
|
|
|
|
onPressed: () {
|
|
|
|
showBadge: appProvider.hasMessage,
|
|
|
|
if (userProvider.isLogin)
|
|
|
|
child: Container(
|
|
|
|
Get.to(() => Message());
|
|
|
|
margin: EdgeInsets.only(top: 5.w, bottom: 5.w),
|
|
|
|
else
|
|
|
|
child: AkuMaterialButton(
|
|
|
|
Get.to(() => LoginPage());
|
|
|
|
minWidth: 78.w,
|
|
|
|
},
|
|
|
|
//消息按钮
|
|
|
|
child: Column(children: [
|
|
|
|
height: double.infinity,
|
|
|
|
Image.asset(
|
|
|
|
onPressed: () {
|
|
|
|
R.ASSETS_HOME_IC_NEWS_PNG,
|
|
|
|
if (userProvider.isLogin)
|
|
|
|
height: 48.w,
|
|
|
|
Get.to(() => Message());
|
|
|
|
width: 48.w,
|
|
|
|
else
|
|
|
|
),
|
|
|
|
Get.to(() => LoginPage());
|
|
|
|
Text(
|
|
|
|
},
|
|
|
|
'消息',
|
|
|
|
child: Column(children: [
|
|
|
|
style: TextStyle(
|
|
|
|
Image.asset(
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
|
R.ASSETS_HOME_IC_NEWS_PNG,
|
|
|
|
fontSize: 20.sp,
|
|
|
|
height: 48.w,
|
|
|
|
|
|
|
|
width: 48.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
]),
|
|
|
|
'消息',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: AppStyle.primaryTextColor,
|
|
|
|
|
|
|
|
fontSize: 20.sp,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 17.w),
|
|
|
|
SizedBox(width: 17.w),
|
|
|
@ -389,114 +406,23 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: _onload
|
|
|
|
//需要重构
|
|
|
|
? Center(
|
|
|
|
body: (!UserTool.userProvider.isLogin)
|
|
|
|
child: Shimmer.fromColors(
|
|
|
|
? SizedBox()
|
|
|
|
child: 'LOADING······'.text.black.size(50.sp).make(),
|
|
|
|
: _onload
|
|
|
|
baseColor: Colors.white,
|
|
|
|
? loadingWidget
|
|
|
|
highlightColor: kPrimaryColor),
|
|
|
|
: ListView(
|
|
|
|
)
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
: ListView(
|
|
|
|
children: [
|
|
|
|
padding: EdgeInsets.all(32.w),
|
|
|
|
Container(
|
|
|
|
children: [
|
|
|
|
//公告标题行
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
|
|
|
//公告标题行
|
|
|
|
height: 45.w,
|
|
|
|
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: () {
|
|
|
|
|
|
|
|
Get.to(() => AllAnouncement());
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
|
|
|
child: Stack(children: [
|
|
|
|
|
|
|
|
CarouselSlider(
|
|
|
|
|
|
|
|
items: _anounceMentList
|
|
|
|
|
|
|
|
.map((e) => AllAnouncementState.anounceCard(e))
|
|
|
|
|
|
|
|
.toList(),
|
|
|
|
|
|
|
|
options: CarouselOptions(
|
|
|
|
|
|
|
|
viewportFraction: 1.0,
|
|
|
|
|
|
|
|
aspectRatio: 686 / 172,
|
|
|
|
|
|
|
|
autoPlay: true,
|
|
|
|
|
|
|
|
onPageChanged: (index, _) {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
_currentIndicator = index;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
top: 144.w,
|
|
|
|
|
|
|
|
left: 0,
|
|
|
|
|
|
|
|
bottom: 16.w,
|
|
|
|
|
|
|
|
right: 0,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: _anounceMentList.map((e) {
|
|
|
|
|
|
|
|
int index = _anounceMentList.indexOf(e);
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: 12.w,
|
|
|
|
|
|
|
|
height: 12.w,
|
|
|
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
|
|
|
color: _currentIndicator == index
|
|
|
|
|
|
|
|
? Color(0xFFFFC40C)
|
|
|
|
|
|
|
|
: Color(0xFFE8E8E8),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}).toList(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
|
|
|
|
//待办事项标题行
|
|
|
|
|
|
|
|
!userProvider.isLogin
|
|
|
|
|
|
|
|
? SizedBox()
|
|
|
|
|
|
|
|
: Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'待办事项',
|
|
|
|
'今日公告',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
fontSize: 32.sp,
|
|
|
|
fontSize: 32.sp,
|
|
|
@ -505,112 +431,203 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Spacer(),
|
|
|
|
AkuButton(
|
|
|
|
AkuButton(
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
//全部公告按钮
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
Get.to(BusinessPage(initIndex: 3));
|
|
|
|
Get.to(() => AllAnouncement());
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
'全部事项',
|
|
|
|
'全部公告',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
fontSize: 24.sp,
|
|
|
|
fontSize: 24.sp,
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Icon(
|
|
|
|
Icon(
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
size: 22.w,
|
|
|
|
size: 22.w,
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
color: AppStyle.minorTextColor,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
),
|
|
|
|
//待办事项栏
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
!userProvider.isLogin
|
|
|
|
//公告栏
|
|
|
|
? SizedBox()
|
|
|
|
Container(
|
|
|
|
: Container(
|
|
|
|
color: Color(0xFFFFFFFF),
|
|
|
|
height: 480.w,
|
|
|
|
width: double.infinity,
|
|
|
|
child: ListView.separated(
|
|
|
|
height: 172.w,
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
child: Stack(children: [
|
|
|
|
return AkuBox.w(16);
|
|
|
|
CarouselSlider(
|
|
|
|
},
|
|
|
|
items: _anounceMentList
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
.map((e) => AllAnouncementState.anounceCard(e))
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
.toList(),
|
|
|
|
return Container(
|
|
|
|
options: CarouselOptions(
|
|
|
|
width: 526.w,
|
|
|
|
viewportFraction: 1.0,
|
|
|
|
child: Builder(
|
|
|
|
aspectRatio: 686 / 172,
|
|
|
|
builder: (context) {
|
|
|
|
autoPlay: true,
|
|
|
|
if (_todoModelList[index]
|
|
|
|
onPageChanged: (index, _) {
|
|
|
|
.dynamicModel
|
|
|
|
setState(() {
|
|
|
|
.runtimeType ==
|
|
|
|
_currentIndicator = index;
|
|
|
|
BussinessAndFixModel) {
|
|
|
|
});
|
|
|
|
return BusinessFixCard(
|
|
|
|
},
|
|
|
|
model: _todoModelList[index]
|
|
|
|
),
|
|
|
|
.dynamicModel);
|
|
|
|
|
|
|
|
} else if (_todoModelList[index]
|
|
|
|
|
|
|
|
.dynamicModel
|
|
|
|
|
|
|
|
.runtimeType ==
|
|
|
|
|
|
|
|
ToDoOutDoorModel) {
|
|
|
|
|
|
|
|
return ToDoOutDoorCard(
|
|
|
|
|
|
|
|
model:
|
|
|
|
|
|
|
|
_todoModelList[index].dynamicModel,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: _todoModelList.length,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
SizedBox(height: 24.w),
|
|
|
|
top: 144.w,
|
|
|
|
//底部信息栏
|
|
|
|
left: 0,
|
|
|
|
!userProvider.isLogin
|
|
|
|
bottom: 16.w,
|
|
|
|
? SizedBox()
|
|
|
|
right: 0,
|
|
|
|
: Container(
|
|
|
|
child: Row(
|
|
|
|
width: double.infinity,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
children: _anounceMentList.map((e) {
|
|
|
|
color: Colors.white,
|
|
|
|
int index = _anounceMentList.indexOf(e);
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: 12.w,
|
|
|
|
|
|
|
|
height: 12.w,
|
|
|
|
|
|
|
|
margin:
|
|
|
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
|
|
|
color: _currentIndicator == index
|
|
|
|
|
|
|
|
? Color(0xFFFFC40C)
|
|
|
|
|
|
|
|
: Color(0xFFE8E8E8),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}).toList(),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
]),
|
|
|
|
children: [
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
SizedBox(height: 16.w),
|
|
|
|
children: [
|
|
|
|
//待办事项标题行
|
|
|
|
_card(_itemNumModel.unProcessedNum ?? 0,
|
|
|
|
!userProvider.isLogin
|
|
|
|
'未处理事项', Color(0xFFFF4E0D), 0),
|
|
|
|
? SizedBox()
|
|
|
|
GridientDiveder().verticalDivider(166.5.w),
|
|
|
|
: Row(
|
|
|
|
_card(_itemNumModel.processingNum ?? 0,
|
|
|
|
children: [
|
|
|
|
'处理中事项', Color(0xFFFFC40C), 1),
|
|
|
|
Text(
|
|
|
|
],
|
|
|
|
'待办事项',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Color(0xFF4A4B51),
|
|
|
|
|
|
|
|
fontSize: 32.sp,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Spacer(),
|
|
|
|
|
|
|
|
AkuButton(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.w),
|
|
|
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
Get.to(BusinessPage(initIndex: 3));
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
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),
|
|
|
|
|
|
|
|
//待办事项栏
|
|
|
|
|
|
|
|
!userProvider.isLogin
|
|
|
|
|
|
|
|
? SizedBox()
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
height: 480.w,
|
|
|
|
|
|
|
|
child: ListView.separated(
|
|
|
|
|
|
|
|
separatorBuilder: (context, index) {
|
|
|
|
|
|
|
|
return AkuBox.w(16);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: 526.w,
|
|
|
|
|
|
|
|
child: Builder(
|
|
|
|
|
|
|
|
builder: (context) {
|
|
|
|
|
|
|
|
if (_todoModelList[index]
|
|
|
|
|
|
|
|
.dynamicModel
|
|
|
|
|
|
|
|
.runtimeType ==
|
|
|
|
|
|
|
|
BussinessAndFixModel) {
|
|
|
|
|
|
|
|
return BusinessFixCard(
|
|
|
|
|
|
|
|
model: _todoModelList[index]
|
|
|
|
|
|
|
|
.dynamicModel);
|
|
|
|
|
|
|
|
} else if (_todoModelList[index]
|
|
|
|
|
|
|
|
.dynamicModel
|
|
|
|
|
|
|
|
.runtimeType ==
|
|
|
|
|
|
|
|
ToDoOutDoorModel) {
|
|
|
|
|
|
|
|
return ToDoOutDoorCard(
|
|
|
|
|
|
|
|
model: _todoModelList[index]
|
|
|
|
|
|
|
|
.dynamicModel,
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCount: _todoModelList.length,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(height: 24.w),
|
|
|
|
|
|
|
|
//底部信息栏
|
|
|
|
|
|
|
|
!userProvider.isLogin
|
|
|
|
|
|
|
|
? SizedBox()
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(children: [
|
|
|
|
child: Column(
|
|
|
|
GridientDiveder().horizontalDivider(343.w),
|
|
|
|
|
|
|
|
GridientDiveder(isReverse: true)
|
|
|
|
|
|
|
|
.horizontalDivider(343.w)
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
_card(_itemNumModel.processedNum ?? 0,
|
|
|
|
Row(
|
|
|
|
'已处理事项', Color(0xFF3F8FFE), 2),
|
|
|
|
children: [
|
|
|
|
GridientDiveder(isReverse: true)
|
|
|
|
_card(_itemNumModel.unProcessedNum ?? 0,
|
|
|
|
.verticalDivider(
|
|
|
|
'未处理事项', Color(0xFFFF4E0D), 0),
|
|
|
|
166.5.w,
|
|
|
|
GridientDiveder()
|
|
|
|
|
|
|
|
.verticalDivider(166.5.w),
|
|
|
|
|
|
|
|
_card(_itemNumModel.processingNum ?? 0,
|
|
|
|
|
|
|
|
'处理中事项', Color(0xFFFFC40C), 1),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(children: [
|
|
|
|
|
|
|
|
GridientDiveder().horizontalDivider(343.w),
|
|
|
|
|
|
|
|
GridientDiveder(isReverse: true)
|
|
|
|
|
|
|
|
.horizontalDivider(343.w)
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
_card(_itemNumModel.processedNum ?? 0,
|
|
|
|
|
|
|
|
'已处理事项', Color(0xFF3F8FFE), 2),
|
|
|
|
|
|
|
|
GridientDiveder(isReverse: true)
|
|
|
|
|
|
|
|
.verticalDivider(
|
|
|
|
|
|
|
|
166.5.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
_card(_itemNumModel.allNum ?? 0, '全部事项',
|
|
|
|
|
|
|
|
Color(0xFF333333), 3),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
_card(_itemNumModel.allNum ?? 0, '全部事项',
|
|
|
|
|
|
|
|
Color(0xFF333333), 3),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
value: SystemUiOverlayStyle.dark,
|
|
|
|
value: SystemUiOverlayStyle.dark,
|
|
|
|
);
|
|
|
|
);
|
|
|
|