StringField constructor

const StringField({
  1. String? labelPrefix,
  2. String? label,
  3. Widget? labelWidget,
  4. TextEditingController? controller,
  5. TextInputType keyboard = TextInputType.text,
  6. String? validator(
    1. String? value
    )?,
  7. int minLines = 1,
  8. int maxLines = 1,
  9. bool obscureText = false,
  10. List<TextInputFormatter>? inputFormatter,
  11. TextAlign textAlign = TextAlign.start,
  12. int? maxLength,
  13. void onSaved(
    1. String? value
    )?,
  14. String? initialValue,
  15. bool enabled = true,
  16. AutovalidateMode autoValidateMode = AutovalidateMode.disabled,
  17. ValueChanged<String?>? onChanged,
  18. FocusNode? focusNode,
  19. TextInputAction? textInputAction,
  20. ValueChanged<String?>? onFieldSubmitted,
  21. bool autocorrect = true,
  22. bool enableSuggestions = true,
  23. TextCapitalization textCapitalization = TextCapitalization.none,
  24. EdgeInsets scrollPadding = const EdgeInsets.all(20),
  25. bool enableInteractiveSelection = true,
  26. bool filled = false,
  27. Color? fillColor,
  28. Iterable<String>? autofillHints,
  29. bool readOnly = false,
  30. TextStyle? style,
  31. InputDecoration? decoration,
  32. EdgeInsets padding = const EdgeInsets.all(8),
  33. String? hintText,
  34. EdgeInsets? contentPadding,
  35. String? counterText = '',
  36. Widget? prefix,
  37. Widget? prefixIcon,
  38. Widget? suffix,
  39. Widget? suffixIcon,
  40. bool trimOnSaved = true,
  41. void onTap()?,
  42. int? sizeExtraSmall,
  43. int? sizeSmall,
  44. int? sizeMedium,
  45. int? sizeLarge,
  46. int? sizeExtraLarge,
  47. double? minHeight,
  48. Key? key,
})

Implementation

const StringField({
  this.labelPrefix,
  this.label,
  this.labelWidget,
  this.controller,
  this.keyboard = TextInputType.text,
  this.validator,
  this.minLines = 1,
  this.maxLines = 1,
  this.obscureText = false,
  this.inputFormatter,
  this.textAlign = TextAlign.start,
  this.maxLength,
  this.onSaved,
  this.initialValue,
  this.enabled = true,
  this.autoValidateMode = AutovalidateMode.disabled,
  this.onChanged,
  this.focusNode,
  this.textInputAction,
  this.onFieldSubmitted,
  this.autocorrect = true,
  this.enableSuggestions = true,
  this.textCapitalization = TextCapitalization.none,
  this.scrollPadding = const EdgeInsets.all(20),
  this.enableInteractiveSelection = true,
  this.filled = false,
  this.fillColor,
  this.autofillHints,
  this.readOnly = false,
  this.style,
  this.decoration,
  this.padding = const EdgeInsets.all(8),
  this.hintText,
  this.contentPadding,
  this.counterText = '',
  this.prefix,
  this.prefixIcon,
  this.suffix,
  this.suffixIcon,
  this.trimOnSaved = true,
  this.onTap,
  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.',
      );