mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
go to home after swb restore success from settings on mobile
This commit is contained in:
parent
48ee44ed29
commit
c751743436
2 changed files with 11 additions and 1 deletions
|
@ -387,6 +387,7 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
|
||||||
RouteGenerator.getRoute(
|
RouteGenerator.getRoute(
|
||||||
builder: (_) => StackRestoreProgressView(
|
builder: (_) => StackRestoreProgressView(
|
||||||
jsonString: jsonString,
|
jsonString: jsonString,
|
||||||
|
shouldPushToHome: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -13,6 +13,7 @@ import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/pages/home_view/home_view.dart';
|
||||||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart';
|
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/dialogs/cancel_stack_restore_dialog.dart';
|
||||||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart';
|
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/helpers/restore_create_backup.dart';
|
||||||
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart';
|
import 'package:stackwallet/pages/settings_views/global_settings_view/stack_backup_views/restore_from_encrypted_string_view.dart';
|
||||||
|
@ -668,7 +669,15 @@ class _StackRestoreProgressViewState
|
||||||
? TextButton(
|
? TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_success) {
|
if (_success) {
|
||||||
Navigator.of(context).pop();
|
if (widget.shouldPushToHome) {
|
||||||
|
Navigator.of(context).popUntil(
|
||||||
|
ModalRoute.withName(
|
||||||
|
HomeView.routeName,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (await _requestCancel()) {
|
if (await _requestCancel()) {
|
||||||
await _cancel();
|
await _cancel();
|
||||||
|
|
Loading…
Reference in a new issue