restrict spark memo length in textfield

This commit is contained in:
julian 2024-01-12 16:00:04 -06:00
parent 05c2974eb0
commit d7a7b7758d
2 changed files with 8 additions and 0 deletions

View file

@ -1397,6 +1397,10 @@ class _SendViewState extends ConsumerState<SendView> {
),
child: TextField(
key: const Key("sendViewMemoFieldKey"),
maxLength: (coin == Coin.firo ||
coin == Coin.firoTestNet)
? 31
: null,
controller: memoController,
readOnly: false,
autocorrect: false,
@ -1411,6 +1415,7 @@ class _SendViewState extends ConsumerState<SendView> {
_memoFocus,
context,
).copyWith(
counterText: '',
contentPadding: const EdgeInsets.only(
left: 16,
top: 6,

View file

@ -1503,6 +1503,8 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
Constants.size.circularBorderRadius,
),
child: TextField(
maxLength:
(coin == Coin.firo || coin == Coin.firoTestNet) ? 31 : null,
minLines: 1,
maxLines: 5,
key: const Key("sendViewMemoFieldKey"),
@ -1526,6 +1528,7 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
context,
desktopMed: true,
).copyWith(
counterText: '',
contentPadding: const EdgeInsets.only(
left: 16,
top: 11,