* 'master' of http://test.akuhotel.com:8099/zhangmeng/aku_community_manager:
  消息页,系统消息页完成

# Conflicts:
#	lib/ui/home/application/applications_page.dart
hmxc
小赖 4 years ago
commit ace507a2c2

@ -1,8 +1,10 @@
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.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';
import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/tools/widget_tool.dart';
import 'package:aku_community_manager/ui/home/messages/message.dart';
import 'package:aku_community_manager/ui/home/application/applications_page.dart'; import 'package:aku_community_manager/ui/home/application/applications_page.dart';
import 'package:aku_community_manager/ui/home/personal_draw.dart'; import 'package:aku_community_manager/ui/home/personal_draw.dart';
import 'package:aku_community_manager/ui/tool_pages/scan_page.dart'; import 'package:aku_community_manager/ui/tool_pages/scan_page.dart';

@ -1,7 +1,12 @@
import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/ui/home/messages/system_message.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_ui/aku_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/instance_manager.dart';
import 'package:get/get.dart';
class Message extends StatefulWidget { class Message extends StatefulWidget {
Message({Key key}) : super(key: key); Message({Key key}) : super(key: key);
@ -11,68 +16,121 @@ class Message extends StatefulWidget {
class _MessageState extends State<Message> { class _MessageState extends State<Message> {
Widget _messageType(String type){ Widget _messageTypeImage(String type){
switch (type) { Icon path;
case'系统消息' : Color ca;
return Container( Color cb;
width: 88.w,height: 88.w, switch (type) {
decoration: BoxDecoration( case'系统消息' :
borderRadius: BorderRadius.circular(44.w), path=Icon(Icons.system_update,size: 66.w,) ;
gradient: LinearGradient(begin: Alignment.topCenter,end: Alignment.bottomCenter,colors: [ ca=Color(0xFFFFDE9A);
Color(0xFFFFDE9A), cb=Color(0xFFFFB00A);
Color(0xFFFFB00A), break;
]), case '评论消息':
), path=Icon(Icons.message,size: 66.w,) ;
child: Icon(Icons.message,size:66.w),); ca=Color(0xFF81D1FF);
break; cb=Color(0xFF1792FF);
case '评论消息': break;
return Container( default:
width: 88.w,height: 88.w, }
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(44.w),
gradient: LinearGradient(begin: Alignment.topCenter,end: Alignment.bottomCenter,colors: [
Color(0xFF81D1FF),
Color(0xFF1792FF),
]),
),
child: Icon(Icons.message_sharp,size:66.w),);
default:
}
}
Widget _messageList(String date,String type){
return Container( return Container(
padding: EdgeInsets.only(top:24.w,left:32.w,), width: 88.w,
child: Row( height: 88.w,
children:[ decoration: BoxDecoration(
borderRadius: BorderRadius.circular(44.w),
SizedBox(width: 24.w,), gradient: LinearGradient(
Column( begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
ca,
cb,
]),
),
child: path,
);
}
Widget _messageListTile(String date, Widget messageImage, String title,String text,int number,Widget page) {
return AkuButton(
color: Color(0xFFFFFFFF),
onPressed: () {
Get.to(page);
},
child: Container(
height: 136.w,
padding: EdgeInsets.only(
top: 24.w,
left: 32.w,
bottom: 24.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Row( messageImage,
children: [ SizedBox(
Text('系统通知',style: AppStyle().primaryStyle,), width: 24.w,
Spacer(), ),
Text(date,style:AppStyle().minorStyle), Expanded(
child: Column(
], mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Text(
title,
style: AppStyle().primaryStyle,
),
Spacer(),
Text(date, style: AppStyle().minorStyle),
],
),
Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(text, style: AppStyle().minorStyle),
Spacer(),
Container(
alignment: Alignment.center,
width: 32.w,
height: 32.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.w),
color: Color(0xFFFF4501)),
child: Text(
number.toString(),
style: TextStyle(
color: Color(0xFFFFFFFF),
fontSize: 20.sp,
),
),
),
],
),
],
),
), ),
], ],
), ),
], ),
), );
);
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AkuScaffold( return AkuScaffold(
title: '消息', title: '消息',
titleStyle: AppStyle().barTitleStyle, titleStyle: AppStyle().barTitleStyle,
body: ListView( body: ListView(
padding: EdgeInsets.only(top:16.w), padding: EdgeInsets.only(top: 16.w),
children: [ children: [
_messageListTile('2020-10-23 9:00',_messageTypeImage('系统消息'), '系统消息','你有一条新的报事报修待处理' ,5,SystemMessage()),
],), Divider(
height: 1.w,
),
_messageListTile('2020-10-23 10:00', _messageTypeImage('评论消息'),'评论消息', '你有一条新的评论回复',7,SystemMessage()),
],
),
); );
} }
} }

@ -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/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_ui/aku_ui.dart'; import 'package:aku_ui/aku_ui.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -19,19 +20,21 @@ class _SystemMessageState extends State<SystemMessage> {
width: double.infinity, width: double.infinity,
height: 48.w + 33.w, height: 48.w + 33.w,
child: Text( child: Text(
'date', date,
style: TextStyle(color: AppStyle.minorTextColor, fontSize: 24.sp), style: TextStyle(color: AppStyle.minorTextColor, fontSize: 24.sp),
), ),
), ),
Container( Container(
padding: EdgeInsets.all(24.w), padding: EdgeInsets.only(top:24.w,left:24.w,right:24.w),
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(children: [ Row(children: [
Icon( Container(
Icons.point_of_sale, width: 16.w,
size: 16.w, height: 16.w,
decoration: BoxDecoration(borderRadius:BorderRadius.circular(8.w),color:Color(0xFFFF4501)),
), ),
SizedBox( SizedBox(
width: 16.w, width: 16.w,
@ -43,7 +46,7 @@ class _SystemMessageState extends State<SystemMessage> {
fontSize: 32.sp, fontSize: 32.sp,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
Spacer(), SizedBox(height:8.w),
]), ]),
Text( Text(
'你有一条新的报事报修,请立即处理', '你有一条新的报事报修,请立即处理',
@ -52,6 +55,7 @@ class _SystemMessageState extends State<SystemMessage> {
fontSize: 28.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
SizedBox(height:24.w),
Row( Row(
children: [ children: [
Icon(Icons.contact_page, size: 40.w), Icon(Icons.contact_page, size: 40.w),
@ -71,6 +75,7 @@ class _SystemMessageState extends State<SystemMessage> {
), ),
], ],
), ),
SizedBox(height:16.w),
Row( Row(
children: [ children: [
Icon( Icon(
@ -89,6 +94,7 @@ class _SystemMessageState extends State<SystemMessage> {
color: AppStyle.primaryTextColor, fontSize: 28.sp)), color: AppStyle.primaryTextColor, fontSize: 28.sp)),
], ],
), ),
SizedBox(height:16.w),
Row( Row(
children: [ children: [
Icon( Icon(
@ -107,9 +113,14 @@ class _SystemMessageState extends State<SystemMessage> {
color: AppStyle.primaryTextColor, fontSize: 28.sp)), color: AppStyle.primaryTextColor, fontSize: 28.sp)),
], ],
), ),
Divider(), SizedBox(height:16.w),
Divider(height: 1.w,),
AkuButton( AkuButton(
onPressed: () {
},
child: Container( child: Container(
height: 88.w,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: 24.w), padding: EdgeInsets.only(left: 24.w),
child: Row( child: Row(
@ -134,10 +145,8 @@ class _SystemMessageState extends State<SystemMessage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return AkuScaffold(
appBar: AppBar( title: '系统消息',
title: Text('消息', style: AppStyle().barTitleStyle),
),
body: ListView( body: ListView(
padding: EdgeInsets.all(32.w), padding: EdgeInsets.all(32.w),
children: [ children: [

@ -1,3 +1,4 @@
import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/const/resource.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';

Loading…
Cancel
Save