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
e5d152a5
Commit
e5d152a5
authored
Jul 10, 2019
by
jinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update time
parent
07997b2a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
message_item.dart
lib/pages/message/home/message_item.dart
+8
-15
No files found.
lib/pages/message/home/message_item.dart
View file @
e5d152a5
...
...
@@ -44,22 +44,17 @@ class MessageItem extends StatelessWidget {
],
);
timeStr
()
{
// datefr
DateTime
dateTime
=
DateTime
.
fromMicrosecondsSinceEpoch
(
message
.
time
.
toInt
(),
isUtc:
false
);
String
timeStr
()
{
DateTime
dateTime
=
DateTime
.
fromMicrosecondsSinceEpoch
((
message
.
time
*
1000
*
1000
).
toInt
(),
isUtc:
false
);
String
time
=
dateTime
.
toString
();
time
=
time
.
substring
(
"yyyy-"
.
length
,
"yyyy-MM-dd"
.
length
);
print
(
'时间---------'
);
print
(
time
);
return
time
;
}
var
contenRow
=
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
new
Expanded
(
child:
new
Text
(
message
.
content
,
maxLines:
2
,
textAlign:
TextAlign
.
start
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xff323232
),
fontSize:
13
,
)),
)
],
...
...
@@ -73,22 +68,20 @@ class MessageItem extends StatelessWidget {
var
timeRow
=
new
Row
(
children:
<
Widget
>[
new
Expanded
(
child:
new
Text
(
message
.
name
),
)
new
Text
(
timeStr
(),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
Color
(
0xff8e8e8e
),
fontSize:
10
,
)),
],
);
return
new
GestureDetector
(
//
onTap: onPressed,
onTap:
timeStr
(),
onTap:
onPressed
,
//
onTap: timeStr(),
child:
new
Container
(
child:
new
Column
(
children:
<
Widget
>[
new
Row
(
children:
<
Widget
>[
new
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
16
,
top:
20
,
bottom:
15
),
padding:
const
EdgeInsets
.
only
(
left:
16
,
top:
20
),
child:
new
Container
(
child:
new
Center
(
child:
thumbImg
,
...
...
@@ -98,7 +91,7 @@ class MessageItem extends StatelessWidget {
new
Expanded
(
flex:
1
,
child:
new
Padding
(
padding:
const
EdgeInsets
.
all
(
10.
0
),
padding:
const
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
bottom:
1
0
),
child:
new
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
...
...
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