TextFieldWidget constructor

const TextFieldWidget({
  1. Key? key,
  2. String? validator(
    1. String? value
    )?,
  3. int? maxLines,
  4. TextStyle? textStyle,
  5. double? labelFontSize,
  6. VoidCallback? onTap,
  7. bool obscureText = false,
  8. TextAlign textAlign = TextAlign.start,
  9. bool enabled = true,
  10. VoidCallbackWithValue<String>? onSaved,
  11. VoidCallbackWithValue<String>? onFieldSubmitted,
  12. VoidCallbackWithValue<String>? onChanged,
  13. List<TextInputFormatter>? inputFormatters,
  14. TextEditingController? controller,
  15. String? initialValue,
  16. TextInputType? keyboardType,
  17. int? minLines,
  18. int? maxLength,
  19. bool readOnly = false,
  20. InputDecoration? decoration,
  21. String? labelText,
  22. String? hintText,
  23. Widget? prefixIcon,
  24. Widget? suffixIcon,
  25. bool isPassword = false,
  26. FocusNode? focusNode,
  27. TextInputAction? textInputAction,
  28. bool showCursor = false,
  29. ColorModel? labelTextColor,
  30. FontWeight? fontWeight,
})

Implementation

const TextFieldWidget({
  super.key,
  this.validator,
  this.maxLines,
  this.textStyle,
  this.labelFontSize,
  this.onTap,
  this.obscureText = false,
  this.textAlign = TextAlign.start,
  this.enabled = true,
  this.onSaved,
  this.onFieldSubmitted,
  this.onChanged,
  this.inputFormatters,
  this.controller,
  this.initialValue,
  this.keyboardType,
  this.minLines,
  this.maxLength,
  this.readOnly = false,
  this.decoration,
  this.labelText,
  this.hintText,
  this.prefixIcon,
  this.suffixIcon,
  this.isPassword = false,
  this.focusNode,
  this.textInputAction,
  this.showCursor = false,
  this.labelTextColor,
  this.fontWeight,
}) : assert(
          !(initialValue != null && controller != null),
          'IF value has been set on initialValue then,'
          ' controller value must be null'
          'or, IF value has been set on controller then,'
          ' initial value must be null');