loading animation on sendCurrency

This commit is contained in:
ryleedavis 2022-12-30 17:26:14 -07:00 committed by julian
parent f0687df008
commit 7163d95cc4

View file

@ -116,6 +116,29 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
fromTicker: fromTicker, fromTicker: fromTicker,
onSelected: (from) => onSelected: (from) =>
ref.read(exchangeFormStateProvider).updateFrom(from, true)); 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 { } else {
final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? ""; final toTicker = ref.read(exchangeFormStateProvider).toTicker ?? "";
final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? ""; final fromTicker = ref.read(exchangeFormStateProvider).fromTicker ?? "";