mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
context mounted check
This commit is contained in:
parent
f033bb8aa0
commit
03da868f90
1 changed files with 13 additions and 11 deletions
|
@ -33,22 +33,24 @@ class WalletSheetCard extends ConsumerWidget {
|
|||
),
|
||||
),
|
||||
onPressed: () async {
|
||||
final manager = ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManager(walletId);
|
||||
if (manager.coin == Coin.monero ||
|
||||
manager.coin == Coin.wownero) {
|
||||
final manager =
|
||||
ref.read(walletsChangeNotifierProvider).getManager(walletId);
|
||||
if (manager.coin == Coin.monero || manager.coin == Coin.wownero) {
|
||||
await manager.initializeExisting();
|
||||
}
|
||||
if (popPrevious) Navigator.of(context).pop();
|
||||
Navigator.of(context).pushNamed(
|
||||
WalletView.routeName,
|
||||
arguments: Tuple2(
|
||||
if (context.mounted) {
|
||||
if (popPrevious && context.mounted) Navigator.of(context).pop();
|
||||
|
||||
await Navigator.of(context).pushNamed(
|
||||
WalletView.routeName,
|
||||
arguments: Tuple2(
|
||||
walletId,
|
||||
ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManagerProvider(walletId)),
|
||||
);
|
||||
.getManagerProvider(walletId),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: WalletInfoRow(
|
||||
walletId: walletId,
|
||||
|
|
Loading…
Reference in a new issue