@@ -17,6 +17,7 @@ import 'package:gsy_github_app_flutter/page/release_page.dart';
1717import 'package:gsy_github_app_flutter/page/repository_detail_page.dart' ;
1818import 'package:gsy_github_app_flutter/page/search_page.dart' ;
1919import 'package:gsy_github_app_flutter/page/user_profile_page.dart' ;
20+
2021/**
2122 * 导航栏
2223 * Created by guoshuyu
@@ -49,61 +50,73 @@ class NavigatorUtils {
4950 }
5051
5152 ///仓库详情
52- static Future goReposDetail (BuildContext context, String userName, String reposName) {
53+ static Future goReposDetail (
54+ BuildContext context, String userName, String reposName) {
5355 return NavigatorRouter (context, RepositoryDetailPage (userName, reposName));
5456 }
5557
5658 ///仓库版本列表
57- static Future goReleasePage (BuildContext context, String userName, String reposName, String releaseUrl, String tagUrl) {
59+ static Future goReleasePage (BuildContext context, String userName,
60+ String reposName, String releaseUrl, String tagUrl) {
5861 return NavigatorRouter (
5962 context,
6063 new ReleasePage (
61- userName,
62- reposName,
63- releaseUrl,
64- tagUrl,
65- ));
64+ userName,
65+ reposName,
66+ releaseUrl,
67+ tagUrl,
68+ ));
6669 }
6770
6871 ///issue详情
69- static Future goIssueDetail (BuildContext context, String userName, String reposName, String num , {bool needRightLocalIcon = false }) {
72+ static Future goIssueDetail (
73+ BuildContext context, String userName, String reposName, String num ,
74+ {bool needRightLocalIcon = false }) {
7075 return NavigatorRouter (
7176 context,
7277 new IssueDetailPage (
73- userName,
74- reposName,
75- num ,
76- needHomeIcon: needRightLocalIcon,
77- ));
78+ userName,
79+ reposName,
80+ num ,
81+ needHomeIcon: needRightLocalIcon,
82+ ));
7883 }
7984
8085 ///通用列表
81- static gotoCommonList (BuildContext context, String title, String showType, String dataType, {String userName, String reposName}) {
86+ static gotoCommonList (
87+ BuildContext context, String title, String showType, String dataType,
88+ {String userName, String reposName}) {
8289 NavigatorRouter (
8390 context,
8491 new CommonListPage (
85- title,
86- showType,
87- dataType,
88- userName: userName,
89- reposName: reposName,
90- ));
92+ title,
93+ showType,
94+ dataType,
95+ userName: userName,
96+ reposName: reposName,
97+ ));
9198 }
9299
93100 ///文件代码详情
94101 static gotoCodeDetailPage (BuildContext context,
95- {String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
102+ {String title,
103+ String userName,
104+ String reposName,
105+ String path,
106+ String data,
107+ String branch,
108+ String htmlUrl}) {
96109 NavigatorRouter (
97110 context,
98111 new CodeDetailPage (
99- title: title,
100- userName: userName,
101- reposName: reposName,
102- path: path,
103- data: data,
104- branch: branch,
105- htmlUrl: htmlUrl,
106- ));
112+ title: title,
113+ userName: userName,
114+ reposName: reposName,
115+ path: path,
116+ data: data,
117+ branch: branch,
118+ htmlUrl: htmlUrl,
119+ ));
107120 }
108121
109122 ///仓库详情通知
@@ -117,48 +130,60 @@ class NavigatorUtils {
117130 }
118131
119132 ///提交详情
120- static Future goPushDetailPage (BuildContext context, String userName, String reposName, String sha, bool needHomeIcon) {
133+ static Future goPushDetailPage (BuildContext context, String userName,
134+ String reposName, String sha, bool needHomeIcon) {
121135 return NavigatorRouter (
122136 context,
123137 new PushDetailPage (
124- sha,
125- userName,
126- reposName,
127- needHomeIcon: needHomeIcon,
128- ));
138+ sha,
139+ userName,
140+ reposName,
141+ needHomeIcon: needHomeIcon,
142+ ));
129143 }
130144
131145 ///全屏Web页面
132146 static Future goGSYWebView (BuildContext context, String url, String title) {
133- return NavigatorRouter (
134- context,
135- new GSYWebView (url, title)
136- );
147+ return NavigatorRouter (context, new GSYWebView (url, title));
137148 }
138149
139150 ///文件代码详情Web
140151 static gotoCodeDetailPageWeb (BuildContext context,
141- {String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
152+ {String title,
153+ String userName,
154+ String reposName,
155+ String path,
156+ String data,
157+ String branch,
158+ String htmlUrl}) {
142159 NavigatorRouter (
143- context, new CodeDetailPageWeb (
144- title: title,
145- userName: userName,
146- reposName: reposName,
147- path: path,
148- data: data,
149- branch: branch,
150- htmlUrl: htmlUrl,
151- ));
160+ context,
161+ new CodeDetailPageWeb (
162+ title: title,
163+ userName: userName,
164+ reposName: reposName,
165+ path: path,
166+ data: data,
167+ branch: branch,
168+ htmlUrl: htmlUrl,
169+ ));
152170 }
153171
154172 ///根据平台跳转文件代码详情Web
155173 static gotoCodeDetailPlatform (BuildContext context,
156- {String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
174+ {String title,
175+ String userName,
176+ String reposName,
177+ String path,
178+ String data,
179+ String branch,
180+ String htmlUrl}) {
157181 NavigatorUtils .gotoCodeDetailPageWeb (
158182 context,
159183 title: title,
160184 reposName: reposName,
161185 userName: userName,
186+ data: data,
162187 path: path,
163188 branch: branch,
164189 );
@@ -174,9 +199,8 @@ class NavigatorUtils {
174199 NavigatorRouter (context, new UserProfileInfo ());
175200 }
176201
177-
178202 static NavigatorRouter (BuildContext context, Widget widget) {
179- return Navigator .push (context, new CupertinoPageRoute (builder: (context) => widget));
203+ return Navigator .push (
204+ context, new CupertinoPageRoute (builder: (context) => widget));
180205 }
181-
182206}
0 commit comments