From 7a62f04860ce64a2ef7aa890f626fb68fbd3fd6a Mon Sep 17 00:00:00 2001 From: Avni Prajapati Date: Thu, 26 Jun 2025 14:58:05 +0530 Subject: [PATCH] Updated app_textfield.dart --- .../app_ui/lib/src/widgets/molecules/app_textfield.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/app_ui/lib/src/widgets/molecules/app_textfield.dart b/packages/app_ui/lib/src/widgets/molecules/app_textfield.dart index f6a39ae..e57afbf 100644 --- a/packages/app_ui/lib/src/widgets/molecules/app_textfield.dart +++ b/packages/app_ui/lib/src/widgets/molecules/app_textfield.dart @@ -20,6 +20,7 @@ class AppTextField extends StatefulWidget { this.contentPadding, this.autofillHints, this.hintTextBelowTextField, + this.maxLength, }) : isPasswordField = false, isObscureText = false; @@ -40,6 +41,7 @@ class AppTextField extends StatefulWidget { this.autofillHints, this.hintTextBelowTextField, this.contentPadding, + this.maxLength, }) : isPasswordField = true, isObscureText = true; @@ -60,6 +62,7 @@ class AppTextField extends StatefulWidget { final FocusNode? focusNode; final int? minLines; final EdgeInsetsGeometry? contentPadding; + final int? maxLength; @override State createState() => _AppTextFieldState(); @@ -100,11 +103,13 @@ class _AppTextFieldState extends State { onChanged: widget.onChanged, autofillHints: widget.autofillHints, focusNode: widget.focusNode, + maxLength: widget.maxLength, decoration: InputDecoration( filled: true, fillColor: widget.backgroundColor ?? context.colorScheme.grey100, hintText: widget.hintText, - contentPadding: widget.contentPadding ?? const EdgeInsets.only(left: Insets.small12), + contentPadding: widget.contentPadding ?? + const EdgeInsets.only(left: Insets.small12, right: Insets.small12), errorMaxLines: 2, focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(Insets.xsmall8),