@@ -20,6 +20,7 @@ class AppTextField extends StatefulWidget {
2020 this .contentPadding,
2121 this .autofillHints,
2222 this .hintTextBelowTextField,
23+ this .maxLength,
2324 }) : isPasswordField = false ,
2425 isObscureText = false ;
2526
@@ -40,6 +41,7 @@ class AppTextField extends StatefulWidget {
4041 this .autofillHints,
4142 this .hintTextBelowTextField,
4243 this .contentPadding,
44+ this .maxLength,
4345 }) : isPasswordField = true ,
4446 isObscureText = true ;
4547
@@ -60,6 +62,7 @@ class AppTextField extends StatefulWidget {
6062 final FocusNode ? focusNode;
6163 final int ? minLines;
6264 final EdgeInsetsGeometry ? contentPadding;
65+ final int ? maxLength;
6366
6467 @override
6568 State <AppTextField > createState () => _AppTextFieldState ();
@@ -100,11 +103,13 @@ class _AppTextFieldState extends State<AppTextField> {
100103 onChanged: widget.onChanged,
101104 autofillHints: widget.autofillHints,
102105 focusNode: widget.focusNode,
106+ maxLength: widget.maxLength,
103107 decoration: InputDecoration (
104108 filled: true ,
105109 fillColor: widget.backgroundColor ?? context.colorScheme.grey100,
106110 hintText: widget.hintText,
107- contentPadding: widget.contentPadding ?? const EdgeInsets .only (left: Insets .small12),
111+ contentPadding: widget.contentPadding ??
112+ const EdgeInsets .only (left: Insets .small12, right: Insets .small12),
108113 errorMaxLines: 2 ,
109114 focusedBorder: OutlineInputBorder (
110115 borderRadius: BorderRadius .circular (Insets .xsmall8),
0 commit comments