mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 12:19:24 +00:00
buy form ui tweaks
This commit is contained in:
parent
6d338b68a1
commit
bda6865657
1 changed files with 50 additions and 6 deletions
|
@ -563,7 +563,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
signed: false,
|
||||
decimal: true,
|
||||
),
|
||||
textAlign: TextAlign.right,
|
||||
textAlign: TextAlign.left,
|
||||
inputFormatters: [
|
||||
// regex to validate a crypto amount with 8 decimal places or
|
||||
// 2 if fiat
|
||||
|
@ -582,9 +582,13 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
],
|
||||
decoration: InputDecoration(
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 22,
|
||||
right: 12,
|
||||
bottom: 22,
|
||||
// top: 22,
|
||||
// right: 12,
|
||||
// bottom: 22,
|
||||
left: 0,
|
||||
top: 8,
|
||||
bottom: 10,
|
||||
right: 5,
|
||||
),
|
||||
hintText: "0",
|
||||
hintStyle: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||
|
@ -607,6 +611,47 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
),
|
||||
),
|
||||
),
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: UnconstrainedBox(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_buyAmountController.text.isNotEmpty
|
||||
? TextFieldIconButton(
|
||||
key: const Key(
|
||||
"buyViewClearAddressFieldButtonKey"),
|
||||
onTap: () {
|
||||
_buyAmountController.text = "";
|
||||
// _receiveAddress = "";
|
||||
setState(() {});
|
||||
},
|
||||
child: const XIcon(),
|
||||
)
|
||||
: TextFieldIconButton(
|
||||
key: const Key(
|
||||
"buyViewPasteAddressFieldButtonKey"),
|
||||
onTap: () async {
|
||||
final ClipboardData? data = await clipboard
|
||||
.getData(Clipboard.kTextPlain);
|
||||
|
||||
final amountString =
|
||||
Decimal.tryParse(data?.text ?? "");
|
||||
if (amountString != null) {
|
||||
_buyAmountController.text =
|
||||
amountString.toString();
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: _buyAmountController.text.isEmpty
|
||||
? const ClipboardIcon()
|
||||
: const XIcon(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
@ -690,8 +735,7 @@ class _BuyFormState extends ConsumerState<BuyForm> {
|
|||
focusNode: _receiveAddressFocusNode,
|
||||
style: STextStyles.field(context),
|
||||
decoration: standardInputDecoration(
|
||||
/*"Enter ${coin.ticker} address",*/
|
||||
"Enter address",
|
||||
"Enter ${selectedCrypto?.ticker} address",
|
||||
_receiveAddressFocusNode,
|
||||
context,
|
||||
).copyWith(
|
||||
|
|
Loading…
Reference in a new issue