@@ -48,6 +48,8 @@ class _RepositoryDetailPageState extends State<RepositoryDetailPage> {
4848
4949 GlobalKey <ReposDetailInfoPageState > infoListKey = new GlobalKey <ReposDetailInfoPageState >();
5050
51+ GlobalKey <RepositoryDetailReadmePageState > readmeKey = new GlobalKey <RepositoryDetailReadmePageState >();
52+
5153 List <String > branchList = new List ();
5254
5355 _RepositoryDetailPageState (this .userName, this .reposName);
@@ -198,6 +200,9 @@ class _RepositoryDetailPageState extends State<RepositoryDetailPage> {
198200 if (fileListKey.currentState != null && fileListKey.currentState.mounted) {
199201 fileListKey.currentState.showRefreshLoading ();
200202 }
203+ if (readmeKey.currentState != null && readmeKey.currentState.mounted) {
204+ readmeKey.currentState.refreshReadme ();
205+ }
201206 }),
202207 ];
203208 return bottomWidget;
@@ -214,20 +219,21 @@ class _RepositoryDetailPageState extends State<RepositoryDetailPage> {
214219 Widget build (BuildContext context) {
215220 fileListKey = new GlobalKey <RepositoryDetailFileListPageState >();
216221 infoListKey = new GlobalKey <ReposDetailInfoPageState >();
222+ readmeKey = new GlobalKey <RepositoryDetailReadmePageState >();
217223 return new GSYTabBarWidget (
218224 type: GSYTabBarWidget .TOP_TAB ,
219225 tarWidgetControl: tarBarControl,
220226 tabItems: [
221227 new Tab (text: GSYStrings .repos_tab_info),
228+ new Tab (text: GSYStrings .repos_tab_readme),
222229 new Tab (text: GSYStrings .repos_tab_issue),
223230 new Tab (text: GSYStrings .repos_tab_file),
224- new Tab (text: GSYStrings .repos_tab_readme),
225231 ],
226232 tabViews: [
227233 new ReposDetailInfoPage (reposDetailInfoPageControl, userName, reposName, branchControl, key: infoListKey),
234+ new RepositoryDetailReadmePage (userName, reposName, branchControl, key: readmeKey),
228235 new RepositoryDetailIssuePage (userName, reposName),
229236 new RepositoryDetailFileListPage (userName, reposName, branchControl, key: fileListKey),
230- new RepositoryDetailReadmePage (),
231237 ],
232238 backgroundColor: GSYColors .primarySwatch,
233239 indicatorColor: Colors .white,
0 commit comments