textFormField static method
Widget
textFormField({
- String? label,
- TextEditingController? controller,
- FormFieldValidator<
String> ? validator, - AutovalidateMode validateMode = AutovalidateMode.disabled,
- String? hint,
- Icon? icon,
- bool obscureText = false,
- TextInputType inputType = TextInputType.text,
- EdgeInsets padding = paddingStepOne,
- EdgeInsets margin = paddingStepOne,
Implementation
static Widget textFormField(
{String? label,
TextEditingController? controller,
FormFieldValidator<String>? validator,
AutovalidateMode validateMode = AutovalidateMode.disabled,
String? hint,
Icon? icon,
bool obscureText = false,
TextInputType inputType = TextInputType.text,
EdgeInsets padding = paddingStepOne,
EdgeInsets margin = paddingStepOne}) =>
Container(
padding: padding,
margin: margin,
child: TextFormField(
autovalidateMode: validateMode,
textDirection: TextDirection.ltr,
controller: controller,
validator: validator,
obscureText: obscureText,
keyboardType: inputType,
style: TextStyle(
fontFamily: defaultFontFamily,
color: AppColors.textColor,
),
decoration: inputDecoration(label: label, hint: hint, icon: icon),
),
);