Commit f5a79189 authored by jinzhu's avatar jinzhu

update

parent 3cdc3a4c
......@@ -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>();
......@@ -58,20 +61,80 @@ class _MessageHomePageState extends State<MessageHomePage> {
Widget _commentList() {
List<Widget> listwidget = commentsList.map((val){
return InkWell(
child: Container(
padding: EdgeInsets.all(5.0),
width: ALDevice.width,
child: Column(
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>[
Image.network(''),
Text(
val['name'],
maxLines: 2,
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: row
),
);
}).toList();
return Wrap(
......@@ -81,20 +144,3 @@ class _MessageHomePageState extends State<MessageHomePage> {
}
}
\ No newline at end of file
// 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
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