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));
|
builder: (_) => NewWalletPage(walletNewVM));
|
||||||
|
|
||||||
case Routes.setupPin:
|
case Routes.setupPin:
|
||||||
Function(BuildContext, String) callback;
|
Function(PinCodeState<PinCodeWidget>, String) callback;
|
||||||
|
|
||||||
if (settings.arguments is Function(BuildContext, String)) {
|
if (settings.arguments is Function(PinCodeState<PinCodeWidget>, String)) {
|
||||||
callback = settings.arguments as Function(BuildContext, String);
|
callback = settings.arguments as Function(PinCodeState<PinCodeWidget>, String);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CupertinoPageRoute<void>(
|
return CupertinoPageRoute<void>(
|
||||||
|
|
|
@ -15,31 +15,31 @@ class WalletMenu {
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.reconnect,
|
title: S.current.reconnect,
|
||||||
image: Image.asset('assets/images/reconnect_menu.png',
|
image: Image.asset('assets/images/reconnect_menu.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.rescan,
|
title: S.current.rescan,
|
||||||
image: Image.asset('assets/images/filter_icon.png',
|
image: Image.asset('assets/images/filter_icon.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.wallets,
|
title: S.current.wallets,
|
||||||
image: Image.asset('assets/images/wallet_menu.png',
|
image: Image.asset('assets/images/wallet_menu.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.nodes,
|
title: S.current.nodes,
|
||||||
image: Image.asset('assets/images/nodes_menu.png',
|
image:
|
||||||
height: 16, width: 16)),
|
Image.asset('assets/images/nodes_menu.png', height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.show_keys,
|
title: S.current.show_keys,
|
||||||
image: Image.asset('assets/images/key_menu.png',
|
image:
|
||||||
height: 16, width: 16)),
|
Image.asset('assets/images/key_menu.png', height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.address_book_menu,
|
title: S.current.address_book_menu,
|
||||||
image: Image.asset('assets/images/open_book_menu.png',
|
image: Image.asset('assets/images/open_book_menu.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.settings_title,
|
title: S.current.settings_title,
|
||||||
image: Image.asset('assets/images/settings_menu.png',
|
image: Image.asset('assets/images/settings_menu.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
];
|
];
|
||||||
|
|
||||||
final BuildContext context;
|
final BuildContext context;
|
||||||
|
@ -61,11 +61,12 @@ class WalletMenu {
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Navigator.of(context).pushNamed(Routes.auth,
|
Navigator.of(context).pushNamed(Routes.auth,
|
||||||
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) =>
|
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) {
|
||||||
isAuthenticatedSuccessfully
|
if (isAuthenticatedSuccessfully) {
|
||||||
? Navigator.of(auth.context)
|
auth.close();
|
||||||
.popAndPushNamed(Routes.showKeys)
|
Navigator.of(auth.context).pushNamed(Routes.showKeys);
|
||||||
: null);
|
}
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
Navigator.of(context).pushNamed(Routes.addressBook);
|
Navigator.of(context).pushNamed(Routes.addressBook);
|
||||||
|
|
|
@ -89,6 +89,11 @@ class PinCodeState<T extends PinCodeWidget> extends State<T> {
|
||||||
..show(_key.currentContext);
|
..show(_key.currentContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void close() {
|
||||||
|
_progressBar?.dismiss();
|
||||||
|
Navigator.of(_key.currentContext).pop();
|
||||||
|
}
|
||||||
|
|
||||||
void hideProgressText() {
|
void hideProgressText() {
|
||||||
_progressBar?.dismiss();
|
_progressBar?.dismiss();
|
||||||
_progressBar = null;
|
_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:flutter/cupertino.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
import 'package:package_info/package_info.dart';
|
import 'package:package_info/package_info.dart';
|
||||||
|
@ -64,16 +65,16 @@ abstract class SettingsViewModelBase with Store {
|
||||||
RegularListItem(
|
RegularListItem(
|
||||||
title: S.current.settings_change_pin,
|
title: S.current.settings_change_pin,
|
||||||
handler: (BuildContext context) {
|
handler: (BuildContext context) {
|
||||||
Navigator.of(context).pushNamed(Routes.auth,
|
Navigator.of(context).pushNamed(Routes.auth, arguments:
|
||||||
arguments: (bool isAuthenticatedSuccessfully,
|
(bool isAuthenticatedSuccessfully, AuthPageState auth) {
|
||||||
AuthPageState auth) =>
|
auth.close();
|
||||||
isAuthenticatedSuccessfully
|
if (isAuthenticatedSuccessfully) {
|
||||||
? Navigator.of(context).popAndPushNamed(
|
Navigator.of(context).pushNamed(Routes.setupPin, arguments:
|
||||||
Routes.setupPin,
|
(PinCodeState<PinCodeWidget> setupPinContext, String _) {
|
||||||
arguments:
|
setupPinContext.close();
|
||||||
(BuildContext setupPinContext, String _) =>
|
});
|
||||||
Navigator.of(context).pop())
|
}
|
||||||
: null);
|
});
|
||||||
}),
|
}),
|
||||||
RegularListItem(
|
RegularListItem(
|
||||||
title: S.current.settings_change_language,
|
title: S.current.settings_change_language,
|
||||||
|
@ -99,7 +100,7 @@ abstract class SettingsViewModelBase with Store {
|
||||||
isAuthenticatedSuccessfully);
|
isAuthenticatedSuccessfully);
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.of(context).pop();
|
auth.close();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setAllowBiometricalAuthentication(value);
|
setAllowBiometricalAuthentication(value);
|
||||||
|
|
|
@ -930,7 +930,7 @@ packages:
|
||||||
name: url_launcher
|
name: url_launcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.7.7"
|
version: "5.7.8"
|
||||||
url_launcher_linux:
|
url_launcher_linux:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
Loading…
Reference in a new issue