Commit 44e0f4cb authored by 杜欣's avatar 杜欣

submit message

parent ebc0303f
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/Annotations/RouterCenterRestore.mark.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/MessageModel.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/common.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
......@@ -115,7 +116,7 @@ class _MessagePageState extends State<MessagePage> {
);
}
getListView() {
Widget getListView() {
return StreamBuilder<MyMessageEntity>(
stream: _messageModel.myMessageLive.stream,
initialData: _messageModel.myMessageLive.data,
......@@ -134,11 +135,11 @@ class _MessagePageState extends State<MessagePage> {
);
}
noData() {
Widget noData() {
return Container();
}
topCard(){
Widget topCard(){
return Container(
color: ALColors.ColorFFFFFF,
child: Column(
......@@ -152,7 +153,11 @@ class _MessagePageState extends State<MessagePage> {
}
var content = data.data?.data?.content ?? '没有新的通知';
return GestureDetector(
onTap: (){},
onTap: (){
RouterCenterImpl()
.findBuriedRouter()
?.onClick(pageName(), "on_click_button");
},
child: messageTop('images/message_noti.png', '通知', content == '' ? '没有新的通知' : content, 0)
);
},
......@@ -204,6 +209,11 @@ class _MessagePageState extends State<MessagePage> {
);
}
@override
String pageName() {
return "message_home";
}
@override
void dispose() {
super.dispose();
......
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/message_date.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart';
......@@ -164,8 +165,7 @@ messageList(list) {
),
),
Text(
dataFormat(list.time),
// list.time.toString(),
MessageDate(list.time).diffTime(),
style: TextStyle(
color: Color(0xfff8e8e8e),
fontSize: ScreenUtil().setSp(10)
......@@ -185,10 +185,3 @@ messageList(list) {
)
);
}
dataFormat(timestamp) {
return TimelineUtil.format((timestamp * 1000).toInt(),
locTimeMillis: DateTime.now().millisecondsSinceEpoch,
locale: 'zh',
dayFormat: DayFormat.Full);
}
......@@ -31,7 +31,6 @@ dependencies:
# gengmei_flutter_plugin: ^0.0.731
cached_network_image: ^1.1.1
flutter_screenutil: ^0.5.3
common_utils: ^1.1.3
gengmei_flutter_plugin:
git:
url: 'git@git.wanmeizhensuo.com:linshengyu/flutter_plugin.git'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment