@@ -3,11 +3,22 @@ import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
33import '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