mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +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(
|
RateTypeToggle(
|
||||||
onChanged: onRateTypeChanged,
|
onChanged: onRateTypeChanged,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
|
||||||
height: 8,
|
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
|
||||||
),
|
const SizedBox(
|
||||||
ExchangeProviderOptions(
|
height: 8,
|
||||||
from: ref.watch(exchangeFormStateProvider).fromTicker,
|
),
|
||||||
to: ref.watch(exchangeFormStateProvider).toTicker,
|
if (ref.read(exchangeFormStateProvider).fromAmount != null &&
|
||||||
fromAmount: ref.watch(exchangeFormStateProvider).fromAmount,
|
ref.read(exchangeFormStateProvider).fromAmount != Decimal.zero)
|
||||||
toAmount: ref.watch(exchangeFormStateProvider).toAmount,
|
ExchangeProviderOptions(
|
||||||
fixedRate: ref.watch(prefsChangeNotifierProvider
|
from: ref.watch(exchangeFormStateProvider).fromTicker,
|
||||||
.select((value) => value.exchangeRateType)) ==
|
to: ref.watch(exchangeFormStateProvider).toTicker,
|
||||||
ExchangeRateType.fixed,
|
fromAmount: ref.watch(exchangeFormStateProvider).fromAmount,
|
||||||
reversed: ref.watch(
|
toAmount: ref.watch(exchangeFormStateProvider).toAmount,
|
||||||
exchangeFormStateProvider.select((value) => value.reversed)),
|
fixedRate: ref.watch(prefsChangeNotifierProvider
|
||||||
),
|
.select((value) => value.exchangeRateType)) ==
|
||||||
|
ExchangeRateType.fixed,
|
||||||
|
reversed: ref.watch(
|
||||||
|
exchangeFormStateProvider.select((value) => value.reversed)),
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue