ModTextBox constructor

const ModTextBox({
  1. Key? key,
  2. String? label,
  3. String? hint,
  4. String? value,
  5. ValueChanged<String>? onChange,
  6. TextEditingController? controller,
  7. List<TextInputFormatter>? inputFormatters,
  8. bool isPassword = false,
  9. bool readOnly = false,
  10. Widget? prefixIcon,
  11. Widget? suffixIcon,
  12. Widget? suffixButton,
  13. TextInputType? keyboardType,
  14. TextStyle? style,
  15. ModTextBoxLabelPosition labelPosition = ModTextBoxLabelPosition.top,
  16. bool floatingLabel = false,
  17. String? validator(
    1. String?
    )?,
  18. String? errorText,
  19. double? width,
  20. double borderRadius = 8.0,
  21. AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
  22. bool autocorrect = false,
  23. bool autofocus = false,
  24. Color? cursorColor,
  25. double? cursorHeight,
  26. bool? enabled,
  27. bool expands = false,
  28. FocusNode? focusNode,
  29. TextInputAction? textInputAction,
  30. int? maxLength,
  31. int? maxLines,
  32. int? minLines,
  33. TextAlign textAlign = TextAlign.start,
  34. GestureTapCallback? onTapOutside,
  35. VoidCallback? onEditingComplete,
  36. FormFieldSetter<String>? onSaved,
  37. GestureTapCallback? onTap,
  38. bool onTapAlwaysCalled = false,
  39. ValueChanged<String>? onFieldSubmitted,
  40. ModTextBoxSize size = ModTextBoxSize.md,
  41. double? fixedHeight,
  42. bool multiline = false,
  43. bool autoHeight = false,
  44. bool showBorder = false,
  45. Color? backgroundColor,
  46. Color? borderColor,
  47. double borderWidth = 1.0,
})

Implementation

const ModTextBox({
  super.key,
  this.label,
  this.hint,
  this.value,
  this.onChange,
  this.controller,
  this.inputFormatters,
  this.isPassword = false,
  this.readOnly = false,
  this.prefixIcon,
  this.suffixIcon,
  this.suffixButton,
  this.keyboardType,
  this.style,
  this.labelPosition = ModTextBoxLabelPosition.top,
  this.floatingLabel = false,
  this.validator,
  this.errorText,
  this.width,
  this.borderRadius = 8.0,
  this.autovalidateMode = AutovalidateMode.onUserInteraction,
  this.autocorrect = false,
  this.autofocus = false,
  this.cursorColor,
  this.cursorHeight,
  this.enabled,
  this.expands = false,
  this.focusNode,
  this.textInputAction,
  this.maxLength,
  this.maxLines,
  this.minLines,
  this.textAlign = TextAlign.start,
  this.onTapOutside,
  this.onEditingComplete,
  this.onSaved,
  this.onTap,
  this.onTapAlwaysCalled = false,
  this.onFieldSubmitted,
  this.size = ModTextBoxSize.md,
  this.fixedHeight,
  this.multiline = false,
  this.autoHeight = false,
  this.showBorder = false,
  this.backgroundColor,
  this.borderColor,
  this.borderWidth = 1.0,
});