CustomTextFormField.withLabel constructor

CustomTextFormField.withLabel({
  1. TextInputType? textInputType = TextInputType.name,
  2. TextEditingController? controller,
  3. bool validation(
    1. String?
    )?,
  4. String? hint = '',
  5. String? errorMsg = '',
  6. FocusNode? nextFocus,
  7. FocusNode? myFocus,
  8. bool? enable = true,
  9. int? maxLines = 1,
  10. IconData? icon,
  11. String? label = '',
})

Implementation

factory CustomTextFormField.withLabel({
  TextInputType? textInputType = TextInputType.name,
  TextEditingController? controller,
  bool Function(String?)? validation,
  String? hint = '',
  String? errorMsg = '',
  FocusNode? nextFocus,
  FocusNode? myFocus,
  bool? enable = true,
  int? maxLines = 1,
  IconData? icon,
  String? label = '',
}) {
  return _CustomTextFormFieldLabel(
    controller: controller,
    textInputType: textInputType,
    validation: validation ?? (value) => true,
    hint: hint,
    errorMsg: errorMsg,
    nextFocus: nextFocus,
    myFocus: myFocus,
    enable: enable,
    maxLines: maxLines,
    icon: icon,
    label: label,
  );
}