|
1 | 1 | import 'package:flutter/material.dart'; |
2 | 2 | import 'package:gsy_github_app_flutter/common/model/User.dart'; |
3 | 3 | import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart'; |
| 4 | +import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart'; |
4 | 5 | import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart'; |
5 | 6 | import 'package:gsy_github_app_flutter/widget/GSYCardItem.dart'; |
6 | 7 | import 'package:gsy_github_app_flutter/widget/GSYIConText.dart'; |
@@ -47,11 +48,16 @@ class UserHeaderItem extends StatelessWidget { |
47 | 48 | if (notifyColor == null) { |
48 | 49 | return Container(); |
49 | 50 | } |
50 | | - return new IconButton( |
51 | | - icon: new Icon( |
52 | | - GSYICons.USER_NOTIFY, |
53 | | - color: color, |
54 | | - size: 18.0, |
| 51 | + return new RawMaterialButton( |
| 52 | + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, |
| 53 | + padding: const EdgeInsets.only(top: 0.0, right: 5.0, left: 5.0), |
| 54 | + constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0), |
| 55 | + child: new ClipOval( |
| 56 | + child: new Icon( |
| 57 | + GSYICons.USER_NOTIFY, |
| 58 | + color: color, |
| 59 | + size: 18.0, |
| 60 | + ), |
55 | 61 | ), |
56 | 62 | onPressed: () { |
57 | 63 | NavigatorUtils.goNotifyPage(context).then((res) { |
@@ -145,12 +151,14 @@ class UserHeaderItem extends StatelessWidget { |
145 | 151 | ///用户描述 |
146 | 152 | new Container( |
147 | 153 | child: new Text( |
148 | | - userInfo.bio == null ? GSYStrings.nothing_now : userInfo.bio, |
| 154 | + userInfo.bio == null |
| 155 | + ? GSYStrings.user_create_at + CommonUtils.getDateStr(userInfo.created_at) |
| 156 | + : userInfo.bio + "\n" + GSYStrings.user_create_at + CommonUtils.getDateStr(userInfo.created_at), |
149 | 157 | style: GSYConstant.subLightSmallText, |
150 | 158 | ), |
151 | 159 | margin: new EdgeInsets.only(top: 6.0, bottom: 2.0), |
152 | 160 | alignment: Alignment.topLeft), |
153 | | - new Padding(padding: EdgeInsets.all(10.0)), |
| 161 | + new Padding(padding: EdgeInsets.only(bottom: 5.0)), |
154 | 162 | new Divider( |
155 | 163 | color: Color(GSYColors.subLightTextColor), |
156 | 164 | ), |
|
0 commit comments