From d7a7b7758de5467d42d6f275052cf47687f84a19 Mon Sep 17 00:00:00 2001 From: julian Date: Fri, 12 Jan 2024 16:00:04 -0600 Subject: [PATCH] restrict spark memo length in textfield --- lib/pages/send_view/send_view.dart | 5 +++++ .../my_stack_view/wallet_view/sub_widgets/desktop_send.dart | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index 86a2b2cdc..0ffeaafdc 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -1397,6 +1397,10 @@ class _SendViewState extends ConsumerState { ), 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 { _memoFocus, context, ).copyWith( + counterText: '', contentPadding: const EdgeInsets.only( left: 16, top: 6, diff --git a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart index 76293ab83..5140558b3 100644 --- a/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart +++ b/lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_send.dart @@ -1503,6 +1503,8 @@ class _DesktopSendState extends ConsumerState { 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 { context, desktopMed: true, ).copyWith( + counterText: '', contentPadding: const EdgeInsets.only( left: 16, top: 11,