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
f5a79189
Commit
f5a79189
authored
Jul 05, 2019
by
jinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3cdc3a4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
30 deletions
+76
-30
message_home.dart
lib/classes/message/home/message_home.dart
+76
-30
No files found.
lib/classes/message/home/message_home.dart
View file @
f5a79189
...
...
@@ -11,7 +11,10 @@ class MessageHomePage extends StatefulWidget {
class
_MessageHomePageState
extends
State
<
MessageHomePage
>
{
List
<
Map
>
commentsList
=[{
'name'
:
'乔金柱1号'
},
{
'name'
:
'miga2号'
},
{
'name'
:
'flutter weex'
}];
List
<
Map
>
commentsList
=[{
'name'
:
'Burial'
,
'icon'
:
'http://alpha-s.gmeiapp.com/2018/12/23/921d3a004e-w'
,
'time'
:
'1.560856220460315E9'
,
'content'
:
'卖萌打滚求翻牌'
},
{
'name'
:
'거짓말 '
,
'icon'
:
'http://alpha-s.gmeiapp.com/2018/12/23/8179d48c63-w'
,
'time'
:
'1.560856220460315E9'
,
'content'
:
'小姐姐,作图app是啥'
},
{
'name'
:
'blugder '
,
'icon'
:
'http://alpha-s.gmeiapp.com/2018/12/23/8179d48c63-w'
,
'time'
:
'1.560856220460315E9'
,
'content'
:
'拍照表情很自然'
}
];
GlobalKey
<
EasyRefreshState
>
_easyRefreshKey
=
new
GlobalKey
<
EasyRefreshState
>();
GlobalKey
<
RefreshFooterState
>
_footerKey
=
new
GlobalKey
<
RefreshFooterState
>();
...
...
@@ -57,20 +60,80 @@ class _MessageHomePageState extends State<MessageHomePage> {
}
Widget
_commentList
()
{
List
<
Widget
>
listwidget
=
commentsList
.
map
((
val
){
List
<
Widget
>
listwidget
=
commentsList
.
map
((
val
){
var
thumbImg
=
new
Container
(
width:
42
,
height:
42
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
image:
new
DecorationImage
(
image:
new
NetworkImage
(
val
[
'icon'
]),
)
),
);
var
titleRow
=
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
<
Widget
>[
new
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
val
[
'name'
],
style:
TextStyle
(
color:
Color
(
0xff323232
),
fontWeight:
FontWeight
.
bold
,
fontSize:
13
)),
new
Padding
(
padding:
EdgeInsets
.
only
(
left:
8
),
child:
Text
(
'评论了你'
,
style:
TextStyle
(
color:
Color
(
0xff323232
),
fontSize:
13
)),
)
],
),
new
Row
(
children:
<
Widget
>[
Text
(
'aaaaaaafff'
,
style:
TextStyle
(
color:
Color
(
0xff323232
),
fontSize:
13
)),
],
)
],
);
var
timeRow
=
new
Row
(
children:
<
Widget
>[
new
Expanded
(
child:
new
Text
(
val
[
'time'
]),
)
],
);
var
row
=
new
Row
(
children:
<
Widget
>[
new
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
16
,
top:
20
,
bottom:
15
),
child:
new
Container
(
child:
new
Center
(
child:
thumbImg
,
),
),
),
new
Expanded
(
flex:
1
,
child:
new
Padding
(
padding:
const
EdgeInsets
.
all
(
10.0
),
child:
new
Column
(
children:
<
Widget
>[
titleRow
,
new
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
0.0
,
8.0
,
0.0
,
0.0
),
child:
timeRow
,
)
],
),
),
),
],
);
return
InkWell
(
child:
Container
(
padding:
EdgeInsets
.
all
(
5.0
),
width:
ALDevice
.
width
,
child:
Column
(
children:
<
Widget
>[
Image
.
network
(
''
),
Text
(
val
[
'name'
],
maxLines:
2
,
),
],
),
child:
row
),
);
}).
toList
();
...
...
@@ -80,21 +143,4 @@ class _MessageHomePageState extends State<MessageHomePage> {
);
}
}
// class Comment extends StatelessWidget {
// final List commentList;
// Comment(Key key, this.commentList): super(key: key)
// @override
// Widget build(BuildContext context) {
// return Container(
// margin: EdgeInsets.only(top: 10.0),
// child: Column(
// children: <Widget>[
// _titleWidget(),
// _commentList(context)
// ],
// ),
// );
// }
// }
\ No newline at end of file
}
\ No newline at end of file
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