|
|
|
|
@ -43,6 +43,7 @@ class AppTextFormField extends StatefulWidget {
|
|
|
|
|
final VoidCallback? onTap;
|
|
|
|
|
final bool showSpeechToText;
|
|
|
|
|
final Color? enableColor;
|
|
|
|
|
final bool makeMultiLinesNull;
|
|
|
|
|
|
|
|
|
|
const AppTextFormField({
|
|
|
|
|
Key? key,
|
|
|
|
|
@ -74,6 +75,7 @@ class AppTextFormField extends StatefulWidget {
|
|
|
|
|
this.showShadow = true,
|
|
|
|
|
this.showWithoutDecoration = false,
|
|
|
|
|
this.alignLabelWithHint = false, // Provide default value
|
|
|
|
|
this.makeMultiLinesNull = false,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.enableColor,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
@ -179,7 +181,7 @@ class _AppTextFormFieldState extends State<AppTextFormField> {
|
|
|
|
|
onChanged: widget.onChange,
|
|
|
|
|
obscureText: widget.obscureText ?? false,
|
|
|
|
|
keyboardType: widget.textInputType,
|
|
|
|
|
maxLines: widget.textInputType == TextInputType.multiline ? 4 : 1,
|
|
|
|
|
maxLines: widget.makeMultiLinesNull ? null:widget.textInputType == TextInputType.multiline ? 4 : 1,
|
|
|
|
|
obscuringCharacter: "*",
|
|
|
|
|
controller: widget.controller,
|
|
|
|
|
textInputAction: widget.textInputType == TextInputType.multiline ? null : widget.textInputAction ?? TextInputAction.next,
|
|
|
|
|
|