diff --git a/assets/message/ic_area.png b/assets/message/ic_area.png new file mode 100644 index 0000000..820fb5a Binary files /dev/null and b/assets/message/ic_area.png differ diff --git a/assets/message/ic_people.png b/assets/message/ic_people.png new file mode 100644 index 0000000..54667c0 Binary files /dev/null and b/assets/message/ic_people.png differ diff --git a/assets/message/ic_phone.png b/assets/message/ic_phone.png new file mode 100644 index 0000000..bcc3791 Binary files /dev/null and b/assets/message/ic_phone.png differ diff --git a/assets/message/ic_pinglun.png b/assets/message/ic_pinglun.png new file mode 100644 index 0000000..27a062e Binary files /dev/null and b/assets/message/ic_pinglun.png differ diff --git a/assets/message/ic_tongzhi.png b/assets/message/ic_tongzhi.png new file mode 100644 index 0000000..0f67e93 Binary files /dev/null and b/assets/message/ic_tongzhi.png differ diff --git a/lib/ui/home/application/applications_page.dart b/lib/ui/home/application/applications_page.dart index 88d0667..63a8fc3 100644 --- a/lib/ui/home/application/applications_page.dart +++ b/lib/ui/home/application/applications_page.dart @@ -1,4 +1,4 @@ - +import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/tools/widget_tool.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_back_button.dart'; diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index b7b0b25..46294d6 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -1,4 +1,4 @@ - +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'; import 'package:aku_community_manager/tools/screen_tool.dart'; @@ -226,7 +226,9 @@ class _HomePageState extends State { minWidth: 78.w, //消息按钮 height: double.infinity, - onPressed: () {}, + onPressed: () { + Get.to(Message()); + }, child: Column(children: [ Image.asset( R.ASSETS_HOME_IC_NEWS_PNG, diff --git a/lib/ui/home/messages/message.dart b/lib/ui/home/messages/message.dart index ffa8a76..ef977f8 100644 --- a/lib/ui/home/messages/message.dart +++ b/lib/ui/home/messages/message.dart @@ -1,3 +1,4 @@ +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/system_message.dart'; import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; @@ -17,17 +18,17 @@ class Message extends StatefulWidget { class _MessageState extends State { 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,7 +47,7 @@ class _MessageState extends State { 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) { @@ -61,6 +62,7 @@ class _MessageState extends State { top: 24.w, left: 32.w, bottom: 24.w, + right: 31.w, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/ui/home/messages/system_message.dart b/lib/ui/home/messages/system_message.dart index ccb44b8..a839f37 100644 --- a/lib/ui/home/messages/system_message.dart +++ b/lib/ui/home/messages/system_message.dart @@ -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); @@ -58,7 +59,7 @@ class _SystemMessageState extends State { 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,10 +79,7 @@ class _SystemMessageState extends State { 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,10 +95,7 @@ class _SystemMessageState extends State { 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, ), diff --git a/lib/ui/home/personal_draw.dart b/lib/ui/home/personal_draw.dart index 7901b38..a8457af 100644 --- a/lib/ui/home/personal_draw.dart +++ b/lib/ui/home/personal_draw.dart @@ -1,4 +1,4 @@ - +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'; import 'package:aku_community_manager/ui/login/login_page.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index d441c23..8dab04f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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