hide exchange options until amount is entered

This commit is contained in:
Marco 2022-10-15 17:56:59 -06:00
parent 9df7894142
commit d26ea4c284

View file

@ -1308,9 +1308,13 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
RateTypeToggle( RateTypeToggle(
onChanged: onRateTypeChanged, onChanged: onRateTypeChanged,
), ),
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
const SizedBox( const SizedBox(
height: 8, height: 8,
), ),
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
ExchangeProviderOptions( ExchangeProviderOptions(
from: ref.watch(exchangeFormStateProvider).fromTicker, from: ref.watch(exchangeFormStateProvider).fromTicker,
to: ref.watch(exchangeFormStateProvider).toTicker, to: ref.watch(exchangeFormStateProvider).toTicker,