Skip to content

Commit

Permalink
fix #120
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuo committed Nov 14, 2018
1 parent a3c9f8c commit 81143e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
27 changes: 14 additions & 13 deletions lib/common/utils/NavigatorUtils.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gsy_github_app_flutter/page/CodeDetailPage.dart';
import 'package:gsy_github_app_flutter/page/CodeDetailPageWeb.dart';
Expand Down Expand Up @@ -45,19 +46,19 @@ class NavigatorUtils {

///个人中心
static goPerson(BuildContext context, String userName) {
Navigator.push(context, new MaterialPageRoute(builder: (context) => new PersonPage(userName)));
Navigator.push(context, new CupertinoPageRoute(builder: (context) => new PersonPage(userName)));
}

///仓库详情
static Future<Null> goReposDetail(BuildContext context, String userName, String reposName) {
return Navigator.push(context, new MaterialPageRoute(builder: (context) => new RepositoryDetailPage(userName, reposName)));
return Navigator.push(context, new CupertinoPageRoute(builder: (context) => new RepositoryDetailPage(userName, reposName)));
}

///仓库版本列表
static Future<Null> goReleasePage(BuildContext context, String userName, String reposName, String releaseUrl, String tagUrl) {
return Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new ReleasePage(
userName,
reposName,
Expand All @@ -70,7 +71,7 @@ class NavigatorUtils {
static Future<Null> goIssueDetail(BuildContext context, String userName, String reposName, String num, {bool needRightLocalIcon = false}) {
return Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new IssueDetailPage(
userName,
reposName,
Expand All @@ -83,7 +84,7 @@ class NavigatorUtils {
static gotoCommonList(BuildContext context, String title, String showType, String dataType, {String userName, String reposName}) {
Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new CommonListPage(
title,
showType,
Expand All @@ -98,7 +99,7 @@ class NavigatorUtils {
{String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new CodeDetailPage(
title: title,
userName: userName,
Expand All @@ -112,19 +113,19 @@ class NavigatorUtils {

///仓库详情通知
static Future<Null> goNotifyPage(BuildContext context) {
return Navigator.push(context, new MaterialPageRoute(builder: (context) => new NotifyPage()));
return Navigator.push(context, new CupertinoPageRoute(builder: (context) => new NotifyPage()));
}

///搜索
static Future<Null> goSearchPage(BuildContext context) {
return Navigator.push(context, new MaterialPageRoute(builder: (context) => new SearchPage()));
return Navigator.push(context, new CupertinoPageRoute(builder: (context) => new SearchPage()));
}

///提交详情
static Future<Null> goPushDetailPage(BuildContext context, String userName, String reposName, String sha, bool needHomeIcon) {
return Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new PushDetailPage(
sha,
userName,
Expand All @@ -137,7 +138,7 @@ class NavigatorUtils {
static Future<Null> goGSYWebView(BuildContext context, String url, String title) {
return Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new GSYWebView(url, title),
),
);
Expand All @@ -148,7 +149,7 @@ class NavigatorUtils {
{String title, String userName, String reposName, String path, String data, String branch, String htmlUrl}) {
Navigator.push(
context,
new MaterialPageRoute(
new CupertinoPageRoute(
builder: (context) => new CodeDetailPageWeb(
title: title,
userName: userName,
Expand Down Expand Up @@ -186,11 +187,11 @@ class NavigatorUtils {

///图片预览
static gotoPhotoViewPage(BuildContext context, String url) {
Navigator.push(context, new MaterialPageRoute(builder: (context) => new PhotoViewPage(url)));
Navigator.push(context, new CupertinoPageRoute(builder: (context) => new PhotoViewPage(url)));
}

///用户配置
static gotoUserProfileInfo(BuildContext context) {
Navigator.push(context, new MaterialPageRoute(builder: (context) => new UserProfileInfo()));
Navigator.push(context, new CupertinoPageRoute(builder: (context) => new UserProfileInfo()));
}
}
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:event_bus/event_bus.dart';
Expand Down Expand Up @@ -35,7 +36,6 @@ class FlutterReduxApp extends StatelessWidget {
trendList: new List(),
themeData: new ThemeData(
primarySwatch: GSYColors.primarySwatch,
platform: TargetPlatform.iOS//滑动返回
),
locale: Locale('zh', 'CH')),
);
Expand Down

0 comments on commit 81143e8

Please sign in to comment.