UppercaseField constructor

UppercaseField({
  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. void onTap()?,
  41. bool trimOnSaved = true,
  42. int? sizeExtraSmall,
  43. int? sizeSmall,
  44. int? sizeMedium,
  45. int? sizeLarge,
  46. int? sizeExtraLarge,
  47. double? minHeight,
  48. Key? key,
})

Implementation

UppercaseField({
  super.labelPrefix,
  super.label,
  super.labelWidget,
  super.controller,
  super.keyboard,
  super.validator,
  super.minLines,
  super.maxLines,
  super.obscureText,
  List<TextInputFormatter>? inputFormatter,
  super.textAlign,
  super.maxLength,
  super.onSaved,
  super.initialValue,
  super.enabled,
  super.autoValidateMode,
  super.onChanged,
  super.focusNode,
  super.textInputAction,
  super.onFieldSubmitted,
  super.autocorrect,
  super.enableSuggestions,
  super.textCapitalization,
  super.scrollPadding,
  super.enableInteractiveSelection,
  super.filled,
  super.fillColor,
  super.autofillHints,
  super.readOnly,
  super.style,
  super.decoration,
  super.padding,
  super.hintText,
  super.contentPadding,
  super.counterText,
  super.prefix,
  super.prefixIcon,
  super.suffix,
  super.suffixIcon,
  super.onTap,
  super.trimOnSaved,
  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.',
      ),
      super(
        inputFormatter: <TextInputFormatter>[
          TextInputFormatter.withFunction(
            (
              TextEditingValue oldValue,
              TextEditingValue newValue,
            ) =>
                newValue.copyWith(text: newValue.text.toUpperCase()),
          ),
          ...inputFormatter ?? <TextInputFormatter>[],
        ],
      );