小赖 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/ui/home/messages/comment_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_ui/aku_ui.dart';
@ -15,19 +17,18 @@ class Message extends StatefulWidget {
}
class _MessageState extends State<Message> {
Widget _messageTypeImage(String type) {
Icon path;
String path;
Color ca;
Color cb;
switch (type) {
case '系统消息':
path=Icon(Icons.system_update,size: 66.w,) ;
path = R.ASSETS_MESSAGE_IC_TONGZHI_PNG;
ca = Color(0xFFFFDE9A);
cb = Color(0xFFFFB00A);
break;
case '评论消息':
path=Icon(Icons.message,size: 66.w,) ;
path = R.ASSETS_MESSAGE_IC_PINGLUN_PNG;
ca = Color(0xFF81D1FF);
cb = Color(0xFF1792FF);
break;
@ -46,21 +47,27 @@ class _MessageState extends State<Message> {
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(
color: Color(0xFFFFFFFF),
onPressed: () {
Get.to(page);
},
onPressed: onpressed,
child: Container(
height: 136.w,
padding: EdgeInsets.only(
top: 24.w,
left: 32.w,
bottom: 24.w,
right: 31.w,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -113,7 +120,6 @@ class _MessageState extends State<Message> {
),
),
);
}
@override
@ -124,11 +130,23 @@ class _MessageState extends State<Message> {
body: ListView(
padding: EdgeInsets.only(top: 16.w),
children: [
_messageListTile('2020-10-23 9:00',_messageTypeImage('系统消息'), '系统消息','你有一条新的报事报修待处理' ,5,SystemMessage()),
_messageListTile('2020-10-23 9:00', _messageTypeImage('系统消息'), '系统消息',
'你有一条新的报事报修待处理', 5, onpressed: () {
Get.to(SystemMessage());
}),
Divider(
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:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community_manager/const/resource.dart';
class SystemMessage extends StatefulWidget {
SystemMessage({Key key}) : super(key: key);
@ -34,7 +35,9 @@ class _SystemMessageState extends State<SystemMessage> {
Container(
width: 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(
width: 16.w,
@ -58,7 +61,11 @@ class _SystemMessageState extends State<SystemMessage> {
SizedBox(height: 24.w),
Row(
children: [
Icon(Icons.contact_page, size: 40.w),
Image.asset(
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
),
@ -78,9 +85,10 @@ class _SystemMessageState extends State<SystemMessage> {
SizedBox(height: 16.w),
Row(
children: [
Icon(
Icons.phone,
size: 40.w,
Image.asset(
R.ASSETS_MESSAGE_IC_PHONE_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
@ -97,9 +105,10 @@ class _SystemMessageState extends State<SystemMessage> {
SizedBox(height: 16.w),
Row(
children: [
Icon(
Icons.airplanemode_active,
size: 40.w,
Image.asset(
R.ASSETS_MESSAGE_IC_AREA_PNG,
width: 40.w,
height: 40.w,
),
SizedBox(
width: 4.w,
@ -114,11 +123,11 @@ class _SystemMessageState extends State<SystemMessage> {
],
),
SizedBox(height: 16.w),
Divider(height: 1.w,),
Divider(
height: 1.w,
),
AkuButton(
onPressed: () {
},
onPressed: () {},
child: Container(
height: 88.w,
alignment: Alignment.center,

@ -1,4 +1,3 @@
import 'package:aku_community_manager/const/resource.dart';
import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/style/app_style.dart';

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

Loading…
Cancel
Save