textFormField static method

Widget textFormField({
  1. String? label,
  2. TextEditingController? controller,
  3. FormFieldValidator<String>? validator,
  4. AutovalidateMode validateMode = AutovalidateMode.disabled,
  5. String? hint,
  6. Icon? icon,
  7. bool obscureText = false,
  8. TextInputType inputType = TextInputType.text,
  9. EdgeInsets padding = paddingStepOne,
  10. 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),
      ),
    );