mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
loading animation on sendCurrency
This commit is contained in:
parent
7759bd2712
commit
31eeeb58c1
1 changed files with 23 additions and 0 deletions
|
@ -120,6 +120,29 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
fromTicker: fromTicker,
|
||||
onSelected: (from) =>
|
||||
ref.read(exchangeFormStateProvider).updateFrom(from, true));
|
||||
|
||||
unawaited(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (_) => WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: Container(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.overlay
|
||||
.withOpacity(0.6),
|
||||
child: const CustomLoadingOverlay(
|
||||
message: "Updating exchange rate",
|
||||
eventBus: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
await Future<void>.delayed(const Duration(milliseconds: 300));
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? "";
|
||||
final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? "";
|
||||
|
|
Loading…
Reference in a new issue