ModTextBox constructor
const
ModTextBox({
- Key? key,
- String? label,
- String? hint,
- String? value,
- ValueChanged<
String> ? onChange, - TextEditingController? controller,
- List<
TextInputFormatter> ? inputFormatters, - bool isPassword = false,
- bool readOnly = false,
- Widget? prefixIcon,
- Widget? suffixIcon,
- Widget? suffixButton,
- TextInputType? keyboardType,
- TextStyle? style,
- ModTextBoxLabelPosition labelPosition = ModTextBoxLabelPosition.top,
- bool floatingLabel = false,
- String? validator()?,
- String? errorText,
- double? width,
- double borderRadius = 8.0,
- AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
- bool autocorrect = false,
- bool autofocus = false,
- Color? cursorColor,
- double? cursorHeight,
- bool? enabled,
- bool expands = false,
- FocusNode? focusNode,
- TextInputAction? textInputAction,
- int? maxLength,
- int? maxLines,
- int? minLines,
- TextAlign textAlign = TextAlign.start,
- GestureTapCallback? onTapOutside,
- VoidCallback? onEditingComplete,
- FormFieldSetter<
String> ? onSaved, - GestureTapCallback? onTap,
- bool onTapAlwaysCalled = false,
- ValueChanged<
String> ? onFieldSubmitted, - ModTextBoxSize size = ModTextBoxSize.md,
- double? fixedHeight,
- bool multiline = false,
- bool autoHeight = false,
- bool showBorder = false,
- Color? backgroundColor,
- Color? borderColor,
- 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,
});