Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile
gmalpha_flutter
Commits
44e0f4cb
Commit
44e0f4cb
authored
Oct 16, 2019
by
杜欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit message
parent
ebc0303f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
MessagePage.dart
lib/NewMessageModel/page/MessagePage.dart
+14
-4
common.dart
lib/NewMessageModel/page/common.dart
+2
-9
pubspec.yaml
pubspec.yaml
+0
-1
No files found.
lib/NewMessageModel/page/MessagePage.dart
View file @
44e0f4cb
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
();
...
...
lib/NewMessageModel/page/common.dart
View file @
44e0f4cb
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
);
}
pubspec.yaml
View file @
44e0f4cb
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment