SeniorTextField constructor

const SeniorTextField({
  1. Key? key,
  2. bool autocorrect = true,
  3. bool autofocus = false,
  4. AutovalidateMode? autovalidateMode,
  5. TextEditingController? controller,
  6. String? counterText,
  7. bool disabled = false,
  8. bool enableSuggestions = true,
  9. FocusNode? focusNode,
  10. String? helper,
  11. String? hintText,
  12. String? initialValue,
  13. List<TextInputFormatter>? inputFormatters,
  14. TextInputType? keyboardType,
  15. String? label,
  16. int? maxLength,
  17. int? maxLines,
  18. int? minLines,
  19. bool obscureText = false,
  20. dynamic onChanged(
    1. String
    )?,
  21. VoidCallback? onEditingComplete,
  22. dynamic onFieldSubmitted(
    1. String
    )?,
  23. void onSaved(
    1. String?
    )?,
  24. VoidCallback? onTap,
  25. void onTapOutside(
    1. PointerDownEvent
    )?,
  26. IconData? prefixIcon,
  27. Widget? prefixWidget,
  28. bool readOnly = false,
  29. bool showCounterText = false,
  30. SeniorTextFieldStyle? style,
  31. IconData? suffixIcon,
  32. IconData? sufixIcon,
  33. Widget? suffixWidget,
  34. Widget? sufixWidget,
  35. TextInputAction? textInputAction,
  36. String? validator(
    1. String?
    )?,
})

Implementation

const SeniorTextField({
  super.key,
  this.autocorrect = true,
  this.autofocus = false,
  this.autovalidateMode,
  this.controller,
  this.counterText,
  this.disabled = false,
  this.enableSuggestions = true,
  this.focusNode,
  this.helper,
  this.hintText,
  this.initialValue,
  this.inputFormatters,
  this.keyboardType,
  this.label,
  this.maxLength,
  this.maxLines,
  this.minLines,
  this.obscureText = false,
  this.onChanged,
  this.onEditingComplete,
  this.onFieldSubmitted,
  this.onSaved,
  this.onTap,
  this.onTapOutside,
  this.prefixIcon,
  this.prefixWidget,
  this.readOnly = false,
  this.showCounterText = false,
  this.style,
  this.suffixIcon,
  this.sufixIcon,
  this.suffixWidget,
  this.sufixWidget,
  this.textInputAction,
  this.validator,
})  : assert(
        !(showCounterText && maxLength == null),
        'You cannot set showCounterText as true if maxLength was not specified',
      ),
      assert(
        !(prefixIcon != null && prefixWidget != null),
        'You cannot use prefixIcon and prefixWidget at the same time',
      ),
      assert(
        !((suffixIcon != null || sufixIcon != null) && (suffixWidget != null || sufixWidget != null)),
        'You cannot use suffixIcon and suffixWidget at the same time',
      );