Skip to content

Commit c270b2c

Browse files
committed
change issue
1 parent 40bf2bb commit c270b2c

2 files changed

Lines changed: 39 additions & 21 deletions

File tree

‎lib/common/style/GSYStyle.dart‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ class GSYStrings {
221221
static const String repos_tab_info = "动态";
222222
static const String repos_tab_file = "文件";
223223
static const String repos_tab_issue = "ISSUE";
224+
static const String repos_tab_issue_all = "所有";
225+
static const String repos_tab_issue_open = "打开";
226+
static const String repos_tab_issue_closed = "关闭";
227+
224228
static const String repos_issue_search = "搜索";
225229
}
226230

‎lib/widget/RepositoryIssueListHeader.dart‎

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,22 @@ import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
33
import 'package:gsy_github_app_flutter/widget/GSYCardItem.dart';
44

55
/**
6+
* 详情issue列表头部,PreferredSizeWidget
67
* Created by guoshuyu
78
* Date: 2018-07-19
89
*/
910

10-
class RepositoryIssueListHeader extends StatelessWidget implements PreferredSizeWidget {
11+
class RepositoryIssueListHeader extends StatefulWidget implements PreferredSizeWidget {
12+
@override
13+
_RepositoryIssueListHeaderState createState() => _RepositoryIssueListHeaderState();
14+
15+
@override
16+
Size get preferredSize {
17+
return new Size.fromHeight(50.0);
18+
}
19+
}
20+
21+
class _RepositoryIssueListHeaderState extends State<RepositoryIssueListHeader> {
1122
@override
1223
Widget build(BuildContext context) {
1324
return new GSYCardItem(
@@ -21,31 +32,34 @@ class RepositoryIssueListHeader extends StatelessWidget implements PreferredSize
2132
child: new Row(
2233
children: <Widget>[
2334
new Expanded(
24-
child: new Text(
25-
"All",
26-
style: GSYConstant.middleTextWhite,
27-
textAlign: TextAlign.center,
28-
)),
35+
child: new FlatButton(
36+
child: new Text(
37+
GSYStrings.repos_tab_issue_all,
38+
style: GSYConstant.middleTextWhite,
39+
textAlign: TextAlign.center,
40+
),
41+
onPressed: () {}),
42+
),
2943
new Container(width: 1.0, height: 30.0, color: Color(GSYColors.subLightTextColor)),
3044
new Expanded(
31-
child: new Text(
32-
"Open",
33-
style: GSYConstant.middleTextWhite,
34-
textAlign: TextAlign.center,
35-
)),
45+
child: new FlatButton(
46+
child: new Text(
47+
GSYStrings.repos_tab_issue_open,
48+
style: GSYConstant.middleTextWhite,
49+
textAlign: TextAlign.center,
50+
),
51+
onPressed: () {}),
52+
),
3653
new Container(width: 1.0, height: 30.0, color: Color(GSYColors.subLightTextColor)),
3754
new Expanded(
38-
child: new Text(
39-
"Closed",
40-
style: GSYConstant.middleTextWhite,
41-
textAlign: TextAlign.center,
42-
)),
55+
child: new FlatButton(
56+
child: new Text(
57+
GSYStrings.repos_tab_issue_closed,
58+
style: GSYConstant.middleTextWhite,
59+
textAlign: TextAlign.center,
60+
),
61+
onPressed: () {})),
4362
],
4463
)));
4564
}
46-
47-
@override
48-
Size get preferredSize {
49-
return new Size.fromHeight(50.0);
50-
}
5165
}

0 commit comments

Comments
 (0)