@@ -4,6 +4,7 @@ import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart';
44import 'package:gsy_github_app_flutter/common/utils/EventUtils.dart' ;
55import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart' ;
66import 'package:gsy_github_app_flutter/widget/GSYCardItem.dart' ;
7+ import 'package:gsy_github_app_flutter/widget/GSYUserIconWidget.dart' ;
78
89/**
910 * 事件Item
@@ -24,37 +25,30 @@ class EventItem extends StatelessWidget {
2425 Widget des = (eventViewModel.actionDes == null || eventViewModel.actionDes.length == 0 )
2526 ? new Container ()
2627 : new Container (
27- child: new Text (
28- eventViewModel.actionDes,
29- style: GSYConstant .subSmallText,
30- maxLines: 3 ,
31- ),
32- margin: new EdgeInsets .only (top: 6.0 , bottom: 2.0 ),
33- alignment: Alignment .topLeft);
28+ child: new Text (
29+ eventViewModel.actionDes,
30+ style: GSYConstant .subSmallText,
31+ maxLines: 3 ,
32+ ),
33+ margin: new EdgeInsets .only (top: 6.0 , bottom: 2.0 ),
34+ alignment: Alignment .topLeft);
3435
3536 Widget userImage = (needImage)
36- ? new IconButton (
37- padding: EdgeInsets .only (top: 0.0 , left: 0.0 , bottom: 0.0 , right: 10.0 ),
38- icon: new ClipOval (
39- child: new FadeInImage .assetNetwork (
40- placeholder: "static/images/logo.png" ,
41- //预览图
42- fit: BoxFit .fitWidth,
43- image: eventViewModel.actionUserPic,
44- width: 30.0 ,
45- height: 30.0 ,
46- ),
47- ),
48- onPressed: () {
49- NavigatorUtils .goPerson (context, eventViewModel.actionUser);
50- })
37+ ? new GSYUserIconWidget (
38+ padding: const EdgeInsets .only (top: 0.0 , right: 5.0 , left: 0.0 ),
39+ width: 30.0 ,
40+ height: 30.0 ,
41+ image: eventViewModel.actionUserPic,
42+ onPressed: () {
43+ NavigatorUtils .goPerson (context, eventViewModel.actionUser);
44+ })
5145 : Container ();
5246 return new Container (
5347 child: new GSYCardItem (
5448 child: new FlatButton (
5549 onPressed: onPressed,
5650 child: new Padding (
57- padding: new EdgeInsets .only (left: 0.0 , top: 5 .0 , right: 0.0 , bottom: 10.0 ),
51+ padding: new EdgeInsets .only (left: 0.0 , top: 10 .0 , right: 0.0 , bottom: 10.0 ),
5852 child: new Column (
5953 mainAxisSize: MainAxisSize .min,
6054 children: < Widget > [
0 commit comments