From 16ca32a882f70b73d8e153125107ff142709f105 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 5 May 2023 08:16:08 -0600 Subject: [PATCH] Don't show exchange providers until amount is entered --- lib/pages/exchange_view/exchange_form.dart | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/pages/exchange_view/exchange_form.dart b/lib/pages/exchange_view/exchange_form.dart index c4d11d162..918b22385 100644 --- a/lib/pages/exchange_view/exchange_form.dart +++ b/lib/pages/exchange_view/exchange_form.dart @@ -953,12 +953,20 @@ class _ExchangeFormState extends ConsumerState { onChanged: onRateTypeChanged, ), ), - Padding( - padding: EdgeInsets.only(top: isDesktop ? 20 : 12), - child: ExchangeProviderOptions( - fixedRate: rateType == ExchangeRateType.fixed, - reversed: ref.watch(efReversedProvider), - ), + AnimatedSize( + duration: const Duration(milliseconds: 300), + child: ref.watch(efSendAmountProvider) == null && + ref.watch(efReceiveAmountProvider) == null + ? const SizedBox( + height: 0, + ) + : Padding( + padding: EdgeInsets.only(top: isDesktop ? 20 : 12), + child: ExchangeProviderOptions( + fixedRate: rateType == ExchangeRateType.fixed, + reversed: ref.watch(efReversedProvider), + ), + ), ), SizedBox( height: isDesktop ? 20 : 12,