@@ -34,21 +34,25 @@ class UserHeaderItem extends StatelessWidget {
3434 ///底部状态栏
3535 _getBottomItem (String title, var value, onPressed) {
3636 String data = value == null ? "" : value.toString ();
37- TextStyle valueStyle = (value != null && value.toString ().length > 4 ) ? GSYConstant .minText : GSYConstant .smallSubLightText;
37+ TextStyle valueStyle = (value != null && value.toString ().length > 6 ) ? GSYConstant .minText : GSYConstant .smallSubLightText;
38+ TextStyle titleStyle = (title != null && title.toString ().length > 6 ) ? GSYConstant .minText : GSYConstant .smallSubLightText;
3839 return new Expanded (
3940 child: new Center (
40- child: new FlatButton (
41- onPressed: onPressed,
42- child: RichText (
43- textAlign: TextAlign .center,
44- text: TextSpan (
45- style: GSYConstant .smallSubLightText,
46- text: title + "\n " ,
47- children: [TextSpan (text: data, style: valueStyle)],
48- ),
49- ),
50- ),
51- ),
41+ child: new RawMaterialButton (
42+ materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
43+ padding: EdgeInsets .only (top: 5.0 ),
44+ constraints: const BoxConstraints (minWidth: 0.0 , minHeight: 0.0 ),
45+ child: RichText (
46+ textAlign: TextAlign .center,
47+ text: TextSpan (
48+ children: [
49+ TextSpan (text: title, style: titleStyle),
50+ TextSpan (text: "\n " , style: valueStyle),
51+ TextSpan (text: data, style: valueStyle)
52+ ],
53+ ),
54+ ),
55+ onPressed: onPressed)),
5256 );
5357 }
5458
@@ -103,7 +107,8 @@ class UserHeaderItem extends StatelessWidget {
103107 if (orgList.length > 3 ) {
104108 list.add (new RawMaterialButton (
105109 onPressed: () {
106- NavigatorUtils .gotoCommonList (context, userInfo.login + " " + CommonUtils .getLocale (context).user_orgs_title, "org" , "user_orgs" , userName: userInfo.login);
110+ NavigatorUtils .gotoCommonList (context, userInfo.login + " " + CommonUtils .getLocale (context).user_orgs_title, "org" , "user_orgs" ,
111+ userName: userInfo.login);
107112 },
108113 materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
109114 padding: const EdgeInsets .only (right: 5.0 , left: 5.0 ),
@@ -324,7 +329,9 @@ class UserHeaderItem extends StatelessWidget {
324329 )),
325330 new Container (
326331 child: new Text (
327- (userInfo.type == "Organization" ) ? CommonUtils .getLocale (context).user_dynamic_group : CommonUtils .getLocale (context).user_dynamic_title,
332+ (userInfo.type == "Organization" )
333+ ? CommonUtils .getLocale (context).user_dynamic_group
334+ : CommonUtils .getLocale (context).user_dynamic_title,
328335 style: GSYConstant .normalTextBold,
329336 overflow: TextOverflow .ellipsis,
330337 ),
0 commit comments