mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-25 19:55:52 +00:00
loading animation on changing receive currency
This commit is contained in:
parent
dd0d668b7c
commit
46fe178b08
1 changed files with 23 additions and 0 deletions
|
@ -246,6 +246,29 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
||||||
fromTicker: ref.read(exchangeFormStateProvider).fromTicker ?? "",
|
fromTicker: ref.read(exchangeFormStateProvider).fromTicker ?? "",
|
||||||
onSelected: (to) =>
|
onSelected: (to) =>
|
||||||
ref.read(exchangeFormStateProvider).updateTo(to, true));
|
ref.read(exchangeFormStateProvider).updateTo(to, 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 {
|
} else {
|
||||||
final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? "";
|
final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? "";
|
||||||
final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? "";
|
final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? "";
|
||||||
|
|
Loading…
Reference in a new issue