TextFormFieldWidget constructor
- Key? key,
- required TextEditingController textController,
- String? label,
- String? hint,
- required bool? isSuffixRequired,
- required bool isPassword,
- int? maxLength,
- int? maxlines,
- bool? isPrefixIconrequired,
- Icon? prefixIcon,
- bool? enabled,
- required double width,
- void onChanged()?,
- void onEditingComplete()?,
- required double fontSize,
- Color? fillColor,
Creates a new instance of TextFormFieldWidget.
textController
- A TextEditingController to display the text the user enterslabel
- A String to show as the label for the text field.hint
- A String to show as the hint for the text field.onChanged
- An optional callback function that might be needed in some textfields to display something in the same pagemaxlines
- an optional maxlines of type intmaxLength
- an optional maxlength of type intisPrefixIconrequired
-an optional bool to check if a prefix icon is required for that fieldprefixIcon
- an optional prefix iconisSuffixRequired
- to check if the field is required or not to display a red (*)enabled
- optional enabled to check if the textfield will be enabled or not *onEditingComplete
-optional callback function to be called when we want to do something when user finish editing the fieldfontSize
for the responsive layout
Implementation
const TextFormFieldWidget({
super.key,
required TextEditingController textController,
String? label,
String? hint,
required bool? isSuffixRequired,
required bool isPassword,
int? maxLength,
int? maxlines,
bool? isPrefixIconrequired,
Icon? prefixIcon,
bool? enabled,
required this.width,
this.onChanged,
this.onEditingComplete,
required this.fontSize,
this.fillColor,
}) : _textController = textController,
_label = label,
_hint = hint,
_isSuffixRequired = isSuffixRequired,
_maxLength = maxLength,
_maxlines = maxlines,
_isPrefixIconRequired = isPrefixIconrequired,
_prefixIcon = prefixIcon,
_enabled = enabled,
_isPassword = isPassword;