Skip to content
Snippets Groups Projects
Commit ea43d66c authored by poka's avatar poka
Browse files

fix: double home screen after forget all safes

parent acd83878
No related branches found
No related tags found
No related merge requests found
Pipeline #34285 waiting for manual action
...@@ -104,10 +104,8 @@ class MyWalletsProvider with ChangeNotifier { ...@@ -104,10 +104,8 @@ class MyWalletsProvider with ChangeNotifier {
myWalletProvider.pinCode = ''; myWalletProvider.pinCode = '';
await Navigator.of(context).pushNamedAndRemoveUntil( await Navigator.of(context)
'/', .pushNamedAndRemoveUntil('/', (Route<dynamic> route) => false);
ModalRoute.withName('/'),
);
} }
return 0; return 0;
} catch (e) { } catch (e) {
......
// ignore_for_file: file_names // ignore_for_file: file_names
import 'dart:math'; import 'dart:math';
import 'package:confetti/confetti.dart'; import 'package:confetti/confetti.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:gecko/globals.dart'; import 'package:gecko/globals.dart';
import 'package:gecko/models/widgets_keys.dart'; import 'package:gecko/models/widgets_keys.dart';
...@@ -91,17 +89,20 @@ Widget finishButton(BuildContext context) { ...@@ -91,17 +89,20 @@ Widget finishButton(BuildContext context) {
width: 380 * ratio, width: 380 * ratio,
height: 60 * ratio, height: 60 * ratio,
child: ElevatedButton( child: ElevatedButton(
key: keyGoWalletsHome, key: keyGoWalletsHome,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
foregroundColor: Colors.white, elevation: 4, foregroundColor: Colors.white,
backgroundColor: orangeC, // foreground elevation: 4,
), backgroundColor: orangeC,
onPressed: () { ),
Navigator.pushNamedAndRemoveUntil( onPressed: () {
context, '/mywallets', ModalRoute.withName('/')); Navigator.pushNamedAndRemoveUntil(
}, context, '/mywallets', ModalRoute.withName('/'));
child: Text("accessMyChest".tr(), },
style: child: Text(
TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600))), "accessMyChest".tr(),
style: TextStyle(fontSize: 22 * ratio, fontWeight: FontWeight.w600),
),
),
); );
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment