@@ -3,9 +3,11 @@ import 'package:fluttertoast/fluttertoast.dart';
33import 'package:gsy_github_app_flutter/common/dao/IssueDao.dart' ;
44import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart' ;
55import 'package:gsy_github_app_flutter/common/utils/CommonUtils.dart' ;
6+ import 'package:gsy_github_app_flutter/common/utils/NavigatorUtils.dart' ;
67import 'package:gsy_github_app_flutter/widget/GSYFlexButton.dart' ;
78import 'package:gsy_github_app_flutter/widget/GSYListState.dart' ;
89import 'package:gsy_github_app_flutter/widget/GSYPullLoadWidget.dart' ;
10+ import 'package:gsy_github_app_flutter/widget/GSYTitleBar.dart' ;
911import 'package:gsy_github_app_flutter/widget/IssueHeaderItem.dart' ;
1012import 'package:gsy_github_app_flutter/widget/IssueItem.dart' ;
1113
@@ -21,10 +23,12 @@ class IssueDetailPage extends StatefulWidget {
2123
2224 final String issueNum;
2325
24- IssueDetailPage (this .userName, this .reposName, this .issueNum);
26+ final bool needRightIcon;
27+
28+ IssueDetailPage (this .userName, this .reposName, this .issueNum, {this .needRightIcon = false });
2529
2630 @override
27- _IssueDetailPageState createState () => _IssueDetailPageState (issueNum, userName, reposName);
31+ _IssueDetailPageState createState () => _IssueDetailPageState (issueNum, userName, reposName, needRightIcon );
2832}
2933
3034// ignore: mixin_inherits_from_not_object
@@ -39,6 +43,8 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
3943
4044 bool headerStatus = false ;
4145
46+ bool needRightIcon = false ;
47+
4248 IssueHeaderViewModel issueHeaderViewModel = new IssueHeaderViewModel ();
4349
4450 TextEditingController issueInfoTitleControl = new TextEditingController ();
@@ -47,7 +53,7 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
4753
4854 TextEditingController issueInfoCommitValueControl = new TextEditingController ();
4955
50- _IssueDetailPageState (this .issueNum, this .userName, this .reposName);
56+ _IssueDetailPageState (this .issueNum, this .userName, this .reposName, this .needRightIcon );
5157
5258 _renderEventItem (index) {
5359 if (index == 0 ) {
@@ -277,11 +283,15 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
277283 return new Scaffold (
278284 persistentFooterButtons: _getBottomWidget (),
279285 appBar: new AppBar (
280- title: new Text (
281- reposName,
282- maxLines: 1 ,
283- overflow: TextOverflow .ellipsis,
284- )),
286+ title: GSYTitleBar (
287+ reposName,
288+ needRightIcon: needRightIcon,
289+ iconData: GSYICons .HOME ,
290+ onPressed: () {
291+ NavigatorUtils .goReposDetail (context, userName, reposName);
292+ },
293+ ),
294+ ),
285295 body: GSYPullLoadWidget (
286296 pullLoadWidgetControl,
287297 (BuildContext context, int index) => _renderEventItem (index),
0 commit comments