mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
add currency symbol in amount input
This commit is contained in:
parent
9b944f51f1
commit
8a0c846a1b
1 changed files with 34 additions and 8 deletions
|
@ -783,15 +783,41 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
fit: BoxFit.scaleDown,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Text(
|
||||
child: Row(children: [
|
||||
buyWithFiat
|
||||
? selectedFiat?.ticker ?? "ERR"
|
||||
: selectedCrypto?.ticker ?? "ERR",
|
||||
style: STextStyles.smallMed14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorDark),
|
||||
),
|
||||
? Text(
|
||||
format.simpleCurrencySymbol(
|
||||
selectedFiat?.ticker ?? "ERR".toUpperCase()),
|
||||
style: STextStyles.currencyTicker(context).apply(
|
||||
fontSizeFactor: (1 /
|
||||
format
|
||||
.simpleCurrencySymbol(
|
||||
selectedFiat?.ticker ?? "ERR")
|
||||
.length * // Couldn't get pow() working here
|
||||
format
|
||||
.simpleCurrencySymbol(
|
||||
selectedFiat?.ticker ?? "ERR")
|
||||
.length)),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
Assets.svg.iconFor(
|
||||
coin: coinFromTickerCaseInsensitive("BTC"),
|
||||
),
|
||||
height: 18,
|
||||
width: 18,
|
||||
),
|
||||
const SizedBox(width: 10), // maybe make isDesktop-aware?
|
||||
Text(
|
||||
buyWithFiat
|
||||
? selectedFiat?.ticker ?? "ERR"
|
||||
: selectedCrypto?.ticker ?? "ERR",
|
||||
style: STextStyles.smallMed14(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.accentColorDark),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
suffixIcon: Padding(
|
||||
|
|
Loading…
Reference in a new issue