Browse Source

1、修改跳转方式

tags/0.0.1
PH2 4 years ago
parent
commit
80ec8f7d5e
3 changed files with 6 additions and 4 deletions
  1. +2
    -1
      lib/pages/login_page/account/login_account_page.dart
  2. +1
    -1
      lib/pages/login_page/login_page.dart
  3. +3
    -2
      lib/util/router_util.dart

+ 2
- 1
lib/pages/login_page/account/login_account_page.dart View File

@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
@@ -55,7 +56,7 @@ class _LoginAccountPageContianerState extends State<LoginAccountPageContianer> i
/// 跳转到邀请码页面 /// 跳转到邀请码页面
void _openInvitePage() { void _openInvitePage() {
print('跳转到邀请码页面'); print('跳转到邀请码页面');
Navigator.push(context, MaterialPageRoute(
Navigator.push(context, CupertinoPageRoute(
// builder: (_) => PageFactory.create('login_invite', null) // builder: (_) => PageFactory.create('login_invite', null)
builder: (_) => LoginInvitePage() builder: (_) => LoginInvitePage()
)); ));


+ 1
- 1
lib/pages/login_page/login_page.dart View File

@@ -42,7 +42,7 @@ class _LoginPageContainerState extends State<LoginPageContainer> {
void _loginClick(String type) { void _loginClick(String type) {
print('登陆$type'); print('登陆$type');
if(type == 'mobile'){ if(type == 'mobile'){
Navigator.push(context, MaterialPageRoute(
Navigator.push(context, CupertinoPageRoute(
builder: (_) => LoginAccountPage(null) builder: (_) => LoginAccountPage(null)
)); ));
} }


+ 3
- 2
lib/util/router_util.dart View File

@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:zhiying_comm/pages/login_page/login_page.dart'; import 'package:zhiying_comm/pages/login_page/login_page.dart';
@@ -38,7 +39,7 @@ class RouterUtil {
page = PageFactory.create('index', Map<String, dynamic>.from(result)); page = PageFactory.create('index', Map<String, dynamic>.from(result));
} }
return Navigator.of(context) return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
.push(CupertinoPageRoute(builder: (BuildContext context) {
return page; return page;
})); }));
} }
@@ -46,7 +47,7 @@ class RouterUtil {
// 跳转登录 // 跳转登录
static Future goLogin(BuildContext context) { static Future goLogin(BuildContext context) {
return Navigator.of(context) return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
.push(CupertinoPageRoute(builder: (BuildContext context) {
return LoginPage(); return LoginPage();
})); }));
} }


Loading…
Cancel
Save