mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Update unspent_coins_list_page.dart
This commit is contained in:
parent
65bb917bfb
commit
71c4f507ac
1 changed files with 8 additions and 5 deletions
|
@ -41,14 +41,17 @@ class UnspentCoinsListPage extends BasePage {
|
|||
final UnspentCoinsListViewModel unspentCoinsListViewModel;
|
||||
|
||||
Future<void> handleOnPopInvoked(BuildContext context) async {
|
||||
final navigator = Navigator.of(context);
|
||||
final hasChanged = unspentCoinsListViewModel.hasAdjustableFieldChanged;
|
||||
if (unspentCoinsListViewModel.items.isEmpty || !hasChanged) {
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
unspentCoinsListViewModel.setIsDisposing(true);
|
||||
await unspentCoinsListViewModel.dispose();
|
||||
Navigator.of(context).pop();
|
||||
if (navigator.canPop()) navigator.pop();
|
||||
return;
|
||||
}
|
||||
|
||||
unspentCoinsListViewModel.setIsDisposing(true);
|
||||
await unspentCoinsListViewModel.dispose();
|
||||
Navigator.of(context).pop();
|
||||
if (navigator.canPop()) navigator.pop();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue