mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
hide exchange options until amount is entered
This commit is contained in:
parent
9df7894142
commit
d26ea4c284
1 changed files with 18 additions and 14 deletions
|
@ -1308,20 +1308,24 @@ class _ExchangeFormState extends ConsumerState<ExchangeForm> {
|
|||
RateTypeToggle(
|
||||
onChanged: onRateTypeChanged,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
ExchangeProviderOptions(
|
||||
from: ref.watch(exchangeFormStateProvider).fromTicker,
|
||||
to: ref.watch(exchangeFormStateProvider).toTicker,
|
||||
fromAmount: ref.watch(exchangeFormStateProvider).fromAmount,
|
||||
toAmount: ref.watch(exchangeFormStateProvider).toAmount,
|
||||
fixedRate: ref.watch(prefsChangeNotifierProvider
|
||||
.select((value) => value.exchangeRateType)) ==
|
||||
ExchangeRateType.fixed,
|
||||
reversed: ref.watch(
|
||||
exchangeFormStateProvider.select((value) => value.reversed)),
|
||||
),
|
||||
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
|
||||
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
|
||||
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
|
||||
ExchangeProviderOptions(
|
||||
from: ref.watch(exchangeFormStateProvider).fromTicker,
|
||||
to: ref.watch(exchangeFormStateProvider).toTicker,
|
||||
fromAmount: ref.watch(exchangeFormStateProvider).fromAmount,
|
||||
toAmount: ref.watch(exchangeFormStateProvider).toAmount,
|
||||
fixedRate: ref.watch(prefsChangeNotifierProvider
|
||||
.select((value) => value.exchangeRateType)) ==
|
||||
ExchangeRateType.fixed,
|
||||
reversed: ref.watch(
|
||||
exchangeFormStateProvider.select((value) => value.reversed)),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue