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

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