OwlnextInput constructor
const
OwlnextInput({
- Key? key,
- TextInputSubType type = TextInputSubType.text,
- TextEditingController? controller,
- String? label,
- String? errorText = '',
- int? minimumLines = 1,
- String? hintText = '',
- Widget? suffixIcon,
- Widget? prefixIcon,
- bool enabled = true,
- void onChanged()?,
- String? suffixText,
- int? charsLimit,
- bool isMandatory = false,
- Function? infoCallback,
- double? amountMaxLimit,
- int? decimalsMaxLimit,
- int? numberMaxLimit,
- int? numberMinLimit,
- FocusNode? focus,
- RegExp? customRegex,
- DateTime? minimumDate,
- DateTime? maximumDate,
- void onSubmitted()?,
- bool isInsideList = true,
- String? text,
- Axis? axis = Axis.vertical,
- bool hasCopyToClipboard = false,
- TextInputAction? textInputAction,
- Iterable<
String> ? autofillHints, - InputDecoration? inputDecoration,
- TextStyle? innerInputTextStyle,
- CrossAxisAlignment? verticalCrossAlignment,
- MainAxisAlignment? verticalMainAlignment,
- TextAlign? textAlign,
- void onEditingComplete()?,
- void datePickerCallback()?,
- bool isExpanded = false,
- ScrollPhysics? physics,
Owlnext form input Based on Material design and uses TextFormField Used to automate all input behavior in one place
Can be customized through a variety of properties, like type
TextInputSubType for specific behaviors
Once you want to validate your form, you can use one of the different input formatters :
parseInputToDouble returns a double
tryParseInputToDouble returns a double or null
formatISOToDateTime returns a DateTime from an ISO date
formatInputToDateTime returns a DateTime from a full date
formatShortInputToDateTime returns a DateTime from a short date
Implementation
const OwlnextInput({
super.key,
this.type = TextInputSubType.text,
this.controller,
this.label,
this.errorText = '',
this.minimumLines = 1,
this.hintText = '',
this.suffixIcon,
this.prefixIcon,
this.enabled = true,
this.onChanged,
this.suffixText,
this.charsLimit,
this.isMandatory = false,
this.infoCallback,
this.amountMaxLimit,
this.decimalsMaxLimit,
this.numberMaxLimit,
this.numberMinLimit,
this.focus,
this.customRegex,
this.minimumDate,
this.maximumDate,
this.onSubmitted,
this.isInsideList = true,
this.text,
this.axis = Axis.vertical,
this.hasCopyToClipboard = false,
this.textInputAction,
this.autofillHints,
this.inputDecoration,
this.innerInputTextStyle,
this.verticalCrossAlignment,
this.verticalMainAlignment,
this.textAlign,
this.onEditingComplete,
this.datePickerCallback,
this.isExpanded = false,
this.physics,
}) : assert(amountMaxLimit == null || (amountMaxLimit != null && type == TextInputSubType.amount)),
assert(decimalsMaxLimit == null || (decimalsMaxLimit != null && type == TextInputSubType.amount)),
assert(numberMaxLimit == null || (numberMaxLimit != null && type == TextInputSubType.numbers)),
assert(numberMinLimit == null || (numberMinLimit != null && type == TextInputSubType.numbers)),
assert(minimumDate == null || (minimumDate != null && type == TextInputSubType.date)),
assert(maximumDate == null || (maximumDate != null && type == TextInputSubType.date)),
assert(datePickerCallback == null || (datePickerCallback != null && (type == TextInputSubType.date || type == TextInputSubType.hours)));