mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Fixes
This commit is contained in:
parent
71e02f429d
commit
082a5f0b6c
5 changed files with 36 additions and 29 deletions
|
@ -85,10 +85,10 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
|||
builder: (_) => NewWalletPage(walletNewVM));
|
||||
|
||||
case Routes.setupPin:
|
||||
Function(BuildContext, String) callback;
|
||||
Function(PinCodeState<PinCodeWidget>, String) callback;
|
||||
|
||||
if (settings.arguments is Function(BuildContext, String)) {
|
||||
callback = settings.arguments as Function(BuildContext, String);
|
||||
if (settings.arguments is Function(PinCodeState<PinCodeWidget>, String)) {
|
||||
callback = settings.arguments as Function(PinCodeState<PinCodeWidget>, String);
|
||||
}
|
||||
|
||||
return CupertinoPageRoute<void>(
|
||||
|
|
|
@ -15,31 +15,31 @@ class WalletMenu {
|
|||
WalletMenuItem(
|
||||
title: S.current.reconnect,
|
||||
image: Image.asset('assets/images/reconnect_menu.png',
|
||||
height: 16, width: 16)),
|
||||
height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.rescan,
|
||||
image: Image.asset('assets/images/filter_icon.png',
|
||||
height: 16, width: 16)),
|
||||
height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.wallets,
|
||||
image: Image.asset('assets/images/wallet_menu.png',
|
||||
height: 16, width: 16)),
|
||||
height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.nodes,
|
||||
image: Image.asset('assets/images/nodes_menu.png',
|
||||
height: 16, width: 16)),
|
||||
image:
|
||||
Image.asset('assets/images/nodes_menu.png', height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.show_keys,
|
||||
image: Image.asset('assets/images/key_menu.png',
|
||||
height: 16, width: 16)),
|
||||
image:
|
||||
Image.asset('assets/images/key_menu.png', height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.address_book_menu,
|
||||
image: Image.asset('assets/images/open_book_menu.png',
|
||||
height: 16, width: 16)),
|
||||
height: 16, width: 16)),
|
||||
WalletMenuItem(
|
||||
title: S.current.settings_title,
|
||||
image: Image.asset('assets/images/settings_menu.png',
|
||||
height: 16, width: 16)),
|
||||
height: 16, width: 16)),
|
||||
];
|
||||
|
||||
final BuildContext context;
|
||||
|
@ -61,11 +61,12 @@ class WalletMenu {
|
|||
break;
|
||||
case 4:
|
||||
Navigator.of(context).pushNamed(Routes.auth,
|
||||
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) =>
|
||||
isAuthenticatedSuccessfully
|
||||
? Navigator.of(auth.context)
|
||||
.popAndPushNamed(Routes.showKeys)
|
||||
: null);
|
||||
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) {
|
||||
if (isAuthenticatedSuccessfully) {
|
||||
auth.close();
|
||||
Navigator.of(auth.context).pushNamed(Routes.showKeys);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 5:
|
||||
Navigator.of(context).pushNamed(Routes.addressBook);
|
||||
|
|
|
@ -89,6 +89,11 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
|||
..show(_key.currentContext);
|
||||
}
|
||||
|
||||
void close() {
|
||||
_progressBar?.dismiss();
|
||||
Navigator.of(_key.currentContext).pop();
|
||||
}
|
||||
|
||||
void hideProgressText() {
|
||||
_progressBar?.dismiss();
|
||||
_progressBar = null;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:cake_wallet/src/screens/pin_code/pin_code_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
@ -64,16 +65,16 @@ abstract class SettingsViewModelBase with Store {
|
|||
RegularListItem(
|
||||
title: S.current.settings_change_pin,
|
||||
handler: (BuildContext context) {
|
||||
Navigator.of(context).pushNamed(Routes.auth,
|
||||
arguments: (bool isAuthenticatedSuccessfully,
|
||||
AuthPageState auth) =>
|
||||
isAuthenticatedSuccessfully
|
||||
? Navigator.of(context).popAndPushNamed(
|
||||
Routes.setupPin,
|
||||
arguments:
|
||||
(BuildContext setupPinContext, String _) =>
|
||||
Navigator.of(context).pop())
|
||||
: null);
|
||||
Navigator.of(context).pushNamed(Routes.auth, arguments:
|
||||
(bool isAuthenticatedSuccessfully, AuthPageState auth) {
|
||||
auth.close();
|
||||
if (isAuthenticatedSuccessfully) {
|
||||
Navigator.of(context).pushNamed(Routes.setupPin, arguments:
|
||||
(PinCodeState<PinCodeWidget> setupPinContext, String _) {
|
||||
setupPinContext.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
}),
|
||||
RegularListItem(
|
||||
title: S.current.settings_change_language,
|
||||
|
@ -99,7 +100,7 @@ abstract class SettingsViewModelBase with Store {
|
|||
isAuthenticatedSuccessfully);
|
||||
}
|
||||
|
||||
Navigator.of(context).pop();
|
||||
auth.close();
|
||||
});
|
||||
} else {
|
||||
setAllowBiometricalAuthentication(value);
|
||||
|
|
|
@ -930,7 +930,7 @@ packages:
|
|||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.7.7"
|
||||
version: "5.7.8"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue