BaseStatefulField<T, C extends ValidatorEditingController<T?>> constructor

const BaseStatefulField<T, C extends ValidatorEditingController<T?>>({
  1. bool required = true,
  2. String? labelPrefix,
  3. String? label,
  4. Widget? labelWidget,
  5. C? controller,
  6. FormFieldValidator<T?>? validator,
  7. TextAlign textAlign = TextAlign.start,
  8. int? maxLength,
  9. FormFieldSetter<T?>? onSaved,
  10. T? initialValue,
  11. bool enabled = true,
  12. AutovalidateMode autoValidateMode = AutovalidateMode.disabled,
  13. FocusNode? focusNode,
  14. TextInputAction? textInputAction,
  15. ValueChanged<String?>? onFieldSubmitted,
  16. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  17. bool enableInteractiveSelection = true,
  18. bool readOnly = false,
  19. TextStyle? style,
  20. InputDecoration? decoration,
  21. EdgeInsets padding = const EdgeInsets.all(8),
  22. String? hintText,
  23. EdgeInsets? contentPadding,
  24. String? counterText = '',
  25. Widget? prefix,
  26. Widget? prefixIcon,
  27. Widget updatePrefixIcon(
    1. BuildContext context,
    2. T? value,
    3. Widget? prefixIcon
    )?,
  28. Widget? suffix,
  29. Widget? suffixIcon,
  30. IconData? suffixIconData,
  31. VoidCallback? onTap,
  32. bool clearOnCancel = true,
  33. int? sizeExtraSmall,
  34. int? sizeSmall,
  35. int? sizeMedium,
  36. int? sizeLarge,
  37. int? sizeExtraLarge,
  38. double? minHeight,
  39. Key? key,
})

Implementation

const BaseStatefulField({
  this.required = true,
  this.labelPrefix,
  this.label,
  this.labelWidget,
  this.controller,
  this.validator,
  this.textAlign = TextAlign.start,
  this.maxLength,
  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.readOnly = false,
  this.style,
  this.decoration,
  this.padding = const EdgeInsets.all(8),
  this.hintText,
  this.contentPadding,
  this.counterText = '',
  this.prefix,
  this.prefixIcon,
  this.updatePrefixIcon,
  this.suffix,
  this.suffixIcon,
  this.suffixIconData,
  this.onTap,
  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.',
     );