小赖 4 years ago
commit ba26cd0a12

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -0,0 +1,146 @@
import 'package:aku_community_manager/style/app_style.dart';
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_ui/common_widgets/aku_common_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart';
class CommentMessage extends StatefulWidget {
CommentMessage({Key key}) : super(key: key);
@override
_CommentMessageState createState() => _CommentMessageState();
}
class _CommentMessageState extends State<CommentMessage> {
Widget _messageList(String date, String name, String comment,) {
return Column(
children: [
Container(
alignment: Alignment.center,
width: double.infinity,
height: 48.w + 33.w,
child: Text(
date,
style: TextStyle(color: AppStyle.minorTextColor, fontSize: 24.sp),
),
),
Container(
padding: EdgeInsets.only(top: 24.w, left: 24.w, right: 24.w),
color: Color(0xFFFFFFFF),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(children: [
Container(
width: 16.w,
height: 16.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Color(0xFFFF4501)),
),
SizedBox(
width: 16.w,
),
Text(
'系统通知',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 32.sp,
fontWeight: FontWeight.w600),
),
SizedBox(height: 8.w),
]),
Text(
'你有一条新的报事报修,请立即处理',
style: TextStyle(
color: AppStyle.primaryTextColor,
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
SizedBox(height: 24.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text(
'评论人',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp),
),
Spacer(),
Text(
name,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
],
),
SizedBox(height: 16.w),
Row(
children: [
Image.asset(
R.ASSETS_MESSAGE_IC_STAR_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
Text('综合评分',
style: TextStyle(
color: AppStyle.minorTextColor, fontSize: 28.sp)),
Spacer(),
Text(comment,
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp)),
],
),
SizedBox(height: 16.w),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {},
child: Container(
height: 88.w,
alignment: Alignment.center,
padding: EdgeInsets.only(left: 24.w),
child: Row(
children: [
Text(
'查看详情',
style: TextStyle(
color: AppStyle.primaryTextColor, fontSize: 28.sp),
),
Spacer(),
Icon(Icons.arrow_forward_ios, size: 22.w),
],
),
),
),
],
),
),
],
);
}
@override
Widget build(BuildContext context) {
return AkuScaffold(
title: '评论消息',
body: ListView(
padding: EdgeInsets.all(32.w),
children: [
_messageList('2020-10-23 10:00', '杨建', '四星'),
_messageList('2020-10-24 11:00', '刘能', '四星'),
],
),
);
}
}

@ -1,4 +1,6 @@
import 'package:aku_community_manager/const/resource.dart';
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/comment_message.dart';
import 'package:aku_community_manager/ui/home/messages/system_message.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:aku_ui/aku_ui.dart';
@ -15,106 +17,110 @@ class Message extends StatefulWidget {
} }
class _MessageState extends State<Message> { class _MessageState extends State<Message> {
Widget _messageTypeImage(String type) {
Widget _messageTypeImage(String type){ String path;
Icon path;
Color ca; Color ca;
Color cb; Color cb;
switch (type) { switch (type) {
case'系统消息' : case '系统消息':
path=Icon(Icons.system_update,size: 66.w,) ; path = R.ASSETS_MESSAGE_IC_TONGZHI_PNG;
ca=Color(0xFFFFDE9A); ca = Color(0xFFFFDE9A);
cb=Color(0xFFFFB00A); cb = Color(0xFFFFB00A);
break;
case '评论消息':
path = R.ASSETS_MESSAGE_IC_PINGLUN_PNG;
ca = Color(0xFF81D1FF);
cb = Color(0xFF1792FF);
break; break;
case '评论消息':
path=Icon(Icons.message,size: 66.w,) ;
ca=Color(0xFF81D1FF);
cb=Color(0xFF1792FF);
break;
default: default:
} }
return Container( return Container(
width: 88.w, width: 88.w,
height: 88.w, height: 88.w,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(44.w), borderRadius: BorderRadius.circular(44.w),
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
colors: [ colors: [
ca, ca,
cb, cb,
]), ]),
), ),
child: path, child: Image.asset(
); path,
width: 70.w,
height: 70.w,
),
);
} }
Widget _messageListTile(String date, Widget messageImage, String title,String text,int number,Widget page) {
Widget _messageListTile(
String date, Widget messageImage, String title, String text, int number,
{VoidCallback onpressed}) {
return AkuButton( return AkuButton(
color: Color(0xFFFFFFFF), color: Color(0xFFFFFFFF),
onPressed: () { onPressed: onpressed,
Get.to(page); child: Container(
}, height: 136.w,
child: Container( padding: EdgeInsets.only(
height: 136.w, top: 24.w,
padding: EdgeInsets.only( left: 32.w,
top: 24.w, bottom: 24.w,
left: 32.w, right: 31.w,
bottom: 24.w, ),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
messageImage,
SizedBox(
width: 24.w,
), ),
child: Row( Expanded(
mainAxisAlignment: MainAxisAlignment.center, child: Column(
children: [ mainAxisSize: MainAxisSize.min,
messageImage, children: [
SizedBox( Row(
width: 24.w,
),
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
Row( Text(
children: [ title,
Text( style: AppStyle().primaryStyle,
title,
style: AppStyle().primaryStyle,
),
Spacer(),
Text(date, style: AppStyle().minorStyle),
],
), ),
Spacer(), Spacer(),
Row( Text(date, style: AppStyle().minorStyle),
mainAxisAlignment: MainAxisAlignment.center, ],
children: [ ),
Text(text, style: AppStyle().minorStyle), Spacer(),
Spacer(), Row(
Container( mainAxisAlignment: MainAxisAlignment.center,
alignment: Alignment.center, children: [
width: 32.w, Text(text, style: AppStyle().minorStyle),
height: 32.w, Spacer(),
decoration: BoxDecoration( Container(
borderRadius: BorderRadius.circular(16.w), alignment: Alignment.center,
color: Color(0xFFFF4501)), width: 32.w,
child: Text( height: 32.w,
number.toString(), decoration: BoxDecoration(
style: TextStyle( borderRadius: BorderRadius.circular(16.w),
color: Color(0xFFFFFFFF), color: Color(0xFFFF4501)),
fontSize: 20.sp, child: Text(
), number.toString(),
), style: TextStyle(
color: Color(0xFFFFFFFF),
fontSize: 20.sp,
), ),
], ),
), ),
], ],
), ),
), ],
], ),
), ),
), ],
); ),
),
} );
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -124,13 +130,25 @@ class _MessageState extends State<Message> {
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()), _messageListTile('2020-10-23 9:00', _messageTypeImage('系统消息'), '系统消息',
'你有一条新的报事报修待处理', 5, onpressed: () {
Get.to(SystemMessage());
}),
Divider( Divider(
height: 1.w, height: 1.w,
), ),
_messageListTile('2020-10-23 10:00', _messageTypeImage('评论消息'),'评论消息', '你有一条新的评论回复',7,SystemMessage()), _messageListTile(
'2020-10-23 10:00',
_messageTypeImage('评论消息'),
'评论消息',
'你有一条新的评论回复',
7,
onpressed: () {
Get.to(CommentMessage());
},
),
], ],
), ),
); );
} }
} }

@ -3,6 +3,7 @@ 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';
import 'package:aku_community_manager/const/resource.dart';
class SystemMessage extends StatefulWidget { class SystemMessage extends StatefulWidget {
SystemMessage({Key key}) : super(key: key); SystemMessage({Key key}) : super(key: key);
@ -25,7 +26,7 @@ class _SystemMessageState extends State<SystemMessage> {
), ),
), ),
Container( Container(
padding: EdgeInsets.only(top:24.w,left:24.w,right: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, crossAxisAlignment: CrossAxisAlignment.start,
@ -34,7 +35,9 @@ class _SystemMessageState extends State<SystemMessage> {
Container( Container(
width: 16.w, width: 16.w,
height: 16.w, height: 16.w,
decoration: BoxDecoration(borderRadius:BorderRadius.circular(8.w),color:Color(0xFFFF4501)), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Color(0xFFFF4501)),
), ),
SizedBox( SizedBox(
width: 16.w, width: 16.w,
@ -46,7 +49,7 @@ class _SystemMessageState extends State<SystemMessage> {
fontSize: 32.sp, fontSize: 32.sp,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
SizedBox(height:8.w), SizedBox(height: 8.w),
]), ]),
Text( Text(
'你有一条新的报事报修,请立即处理', '你有一条新的报事报修,请立即处理',
@ -55,10 +58,14 @@ class _SystemMessageState extends State<SystemMessage> {
fontSize: 28.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
SizedBox(height:24.w), SizedBox(height: 24.w),
Row( Row(
children: [ children: [
Icon(Icons.contact_page, size: 40.w), Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox( SizedBox(
width: 4.w, width: 4.w,
), ),
@ -75,12 +82,13 @@ class _SystemMessageState extends State<SystemMessage> {
), ),
], ],
), ),
SizedBox(height:16.w), SizedBox(height: 16.w),
Row( Row(
children: [ children: [
Icon( Image.asset(
Icons.phone, R.ASSETS_MESSAGE_IC_PHONE_PNG,
size: 40.w, width: 40.w,
height: 40.w,
), ),
SizedBox( SizedBox(
width: 4.w, width: 4.w,
@ -94,12 +102,13 @@ class _SystemMessageState extends State<SystemMessage> {
color: AppStyle.primaryTextColor, fontSize: 28.sp)), color: AppStyle.primaryTextColor, fontSize: 28.sp)),
], ],
), ),
SizedBox(height:16.w), SizedBox(height: 16.w),
Row( Row(
children: [ children: [
Icon( Image.asset(
Icons.airplanemode_active, R.ASSETS_MESSAGE_IC_AREA_PNG,
size: 40.w, width: 40.w,
height: 40.w,
), ),
SizedBox( SizedBox(
width: 4.w, width: 4.w,
@ -113,12 +122,12 @@ class _SystemMessageState extends State<SystemMessage> {
color: AppStyle.primaryTextColor, fontSize: 28.sp)), color: AppStyle.primaryTextColor, fontSize: 28.sp)),
], ],
), ),
SizedBox(height:16.w), SizedBox(height: 16.w),
Divider(height: 1.w,), Divider(
height: 1.w,
),
AkuButton( AkuButton(
onPressed: () { onPressed: () {},
},
child: Container( child: Container(
height: 88.w, height: 88.w,
alignment: Alignment.center, alignment: Alignment.center,

@ -1,4 +1,3 @@
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';

@ -69,6 +69,7 @@ flutter:
- assets/ - assets/
- assets/home/ - assets/home/
- assets/user/ - assets/user/
- assets/message/
# To add assets to your application, add an assets section, like this: # To add assets to your application, add an assets section, like this:
# assets: # assets:
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg

Loading…
Cancel
Save