SmartTextFormField constructor
const
SmartTextFormField({
- Key? key,
- required FormType formType,
- TextEditingController? controller,
- ValueChanged<
String> ? onChanged, - String? fieldName,
- Color? fieldNameColor,
- double fieldFontSize = StandardFieldStyle.fieldFontSize,
- FontWeight fieldFontWeight = StandardFieldStyle.fieldFontWeight,
- String? hintText,
- Color? hintTextColor,
- double hintTextFontSize = StandardFieldStyle.hintTextFontSize,
- FontWeight hintTextFontWeight = StandardFieldStyle.hintTextFontWeight,
- String? emptyFieldErrorMessage,
- String? invalidFormErrorMessage,
- String? validator()?,
- TextEditingController? matchController,
- int? minLength,
- TextCapitalization? textCapitalization,
- bool enabled = true,
- bool readOnly = false,
- AutovalidateMode? autovalidateMode,
- TextInputAction? textInputAction,
- ValueChanged<
String> ? onFieldSubmitted, - Color? iconColor,
- double iconSize = StandardFieldStyle.iconSize,
- IconData? prefixIcon,
- IconData? suffixIconData,
- bool? outlinedIcon,
- BorderRadius? borderRadius,
- BorderSide? enabledBorderSide,
- BorderSide? focusedBorderSide,
- BorderSide? errorBorderSide,
- BorderSide? focusedErrorBorderSide,
- BoxBorder? borderStyle,
- TextStyle? errorMessageStyle,
- EdgeInsets insidePadding = StandardFieldStyle.insidePadding,
- EdgeInsets? outsidePadding,
- Color? fillColor,
- Color? primaryColor,
Implementation
const SmartTextFormField({
super.key,
required this.formType,
this.controller,
this.onChanged,
this.fieldName,
this.fieldNameColor,
this.fieldFontSize = StandardFieldStyle.fieldFontSize,
this.fieldFontWeight = StandardFieldStyle.fieldFontWeight,
this.hintText,
this.hintTextColor,
this.hintTextFontSize = StandardFieldStyle.hintTextFontSize,
this.hintTextFontWeight = StandardFieldStyle.hintTextFontWeight,
this.emptyFieldErrorMessage,
this.invalidFormErrorMessage,
this.validator,
this.matchController,
this.minLength,
this.textCapitalization,
this.enabled = true,
this.readOnly = false,
this.autovalidateMode,
this.textInputAction,
this.onFieldSubmitted,
this.iconColor,
this.iconSize = StandardFieldStyle.iconSize,
this.prefixIcon,
this.suffixIconData,
this.outlinedIcon,
this.borderRadius,
this.enabledBorderSide,
this.focusedBorderSide,
this.errorBorderSide,
this.focusedErrorBorderSide,
this.borderStyle,
this.errorMessageStyle,
this.insidePadding = StandardFieldStyle.insidePadding,
this.outsidePadding,
this.fillColor,
this.primaryColor,
}) : assert(
formType != FormType.confirmPassword || matchController != null,
'matchController is required when formType is confirmPassword',
);