ZetaTextInput constructor

const ZetaTextInput(
  1. {Key? key,
  2. ValueChanged<String?>? onChange,
  3. bool disabled = false,
  4. ZetaFormFieldRequirement requirementLevel = ZetaFormFieldRequirement.none,
  5. String? initialValue,
  6. String? label,
  7. String? hintText,
  8. String? placeholder,
  9. String? errorText,
  10. TextEditingController? controller,
  11. String? validator(
    1. String?
    )?,
  12. Widget? suffix,
  13. Widget? prefix,
  14. ZetaWidgetSize size = ZetaWidgetSize.medium,
  15. bool rounded = true,
  16. List<TextInputFormatter>? inputFormatters,
  17. String? prefixText,
  18. TextStyle? prefixTextStyle,
  19. String? suffixText,
  20. TextStyle? suffixTextStyle,
  21. void onSubmit(
    1. String? val
    )?}
)

Creates a new ZetaTextInput

Implementation

const ZetaTextInput({
  super.key,
  super.onChange,
  super.disabled = false,
  super.requirementLevel = ZetaFormFieldRequirement.none,
  super.initialValue,
  this.label,
  this.hintText,
  this.placeholder,
  this.errorText,
  this.controller,
  this.validator,
  this.suffix,
  this.prefix,
  this.size = ZetaWidgetSize.medium,
  this.rounded = true,
  this.inputFormatters,
  this.prefixText,
  this.prefixTextStyle,
  this.suffixText,
  this.suffixTextStyle,
  this.onSubmit,
})  : assert(initialValue == null || controller == null, 'Only one of initial value and controller can be accepted.'),
      assert(prefix == null || prefixText == null, 'Only one of prefix or prefixText can be accepted.'),
      assert(suffix == null || suffixText == null, 'Only one of suffix or suffixText can be accepted.');