Procházet zdrojové kódy

1、修改跳转方式

tags/0.0.1
PH2 před 4 roky
rodič
revize
80ec8f7d5e
3 změnil soubory, kde provedl 6 přidání a 4 odebrání
  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 Zobrazit soubor

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


+ 1
- 1
lib/pages/login_page/login_page.dart Zobrazit soubor

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


+ 3
- 2
lib/util/router_util.dart Zobrazit soubor

@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.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));
}
return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
.push(CupertinoPageRoute(builder: (BuildContext context) {
return page;
}));
}
@@ -46,7 +47,7 @@ class RouterUtil {
// 跳转登录
static Future goLogin(BuildContext context) {
return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
.push(CupertinoPageRoute(builder: (BuildContext context) {
return LoginPage();
}));
}


Načítá se…
Zrušit
Uložit