BaseStatefulField<T, C extends ValidatorEditingController<T> > constructor
const
BaseStatefulField<T, C extends ValidatorEditingController<T> > ({
- String? labelPrefix = '',
- String? label,
- Widget? labelWidget,
- C? controller,
- FormFieldValidator<
T?> ? validator, - TextAlign textAlign = TextAlign.start,
- FormFieldSetter<
T?> ? onSaved, - T? initialValue,
- bool enabled = true,
- AutovalidateMode autoValidateMode = AutovalidateMode.disabled,
- FocusNode? focusNode,
- TextInputAction? textInputAction,
- ValueChanged<
String?> ? onFieldSubmitted, - EdgeInsets scrollPadding = const EdgeInsets.all(20),
- bool enableInteractiveSelection = true,
- bool filled = false,
- Color? fillColor,
- bool readOnly = false,
- TextStyle? style,
- InputDecoration? decoration,
- EdgeInsets padding = const EdgeInsets.all(8),
- String? hintText,
- EdgeInsets? contentPadding,
- int? maxLength,
- String? counterText = '',
- Widget? prefix,
- Widget? prefixIcon,
- Widget updatePrefixIcon(
- BuildContext context,
- T? value,
- Widget? prefixIcon
- Widget? suffix,
- Widget? suffixIcon,
- IconData? suffixIconData,
- void onTap()?,
- void lostFocus(
- T?
- bool required = true,
- bool clearOnCancel = true,
- int? sizeExtraSmall,
- int? sizeSmall,
- int? sizeMedium,
- int? sizeLarge,
- int? sizeExtraLarge,
- double? minHeight,
- Key? key,
Implementation
const BaseStatefulField({
this.labelPrefix = '',
this.label,
this.labelWidget,
this.controller,
this.validator,
this.textAlign = TextAlign.start,
this.onSaved,
this.initialValue,
this.enabled = true,
this.autoValidateMode = AutovalidateMode.disabled,
this.focusNode,
this.textInputAction,
this.onFieldSubmitted,
this.scrollPadding = const EdgeInsets.all(20),
this.enableInteractiveSelection = true,
this.filled = false,
this.fillColor,
this.readOnly = false,
this.style,
this.decoration,
this.padding = const EdgeInsets.all(8),
this.hintText,
this.contentPadding,
this.maxLength,
this.counterText = '',
this.prefix,
this.prefixIcon,
this.updatePrefixIcon,
this.suffix,
this.suffixIcon,
this.suffixIconData,
this.onTap,
this.lostFocus,
this.required = true,
this.clearOnCancel = true,
super.sizeExtraSmall,
super.sizeSmall,
super.sizeMedium,
super.sizeLarge,
super.sizeExtraLarge,
super.minHeight,
super.key,
}) : assert(
initialValue == null || controller == null,
'initialValue or controller must be null.',
),
assert(
label == null || labelWidget == null,
'label or labelWidget must be null.',
);