OptimusInputField constructor
const
OptimusInputField({
- Key? key,
- ValueChanged<
String> ? onChanged, - String? placeholder,
- TextStyle? placeholderStyle,
- TextInputType? keyboardType,
- bool isPasswordField = false,
- bool isEnabled = true,
- TextInputAction? textInputAction,
- ValueChanged<
String> ? onSubmitted, - FocusNode? focusNode,
- String? label,
- Widget? caption,
- IconData? captionIcon = OptimusIcons.info,
- Widget? helperMessage,
- int maxLines = 1,
- int? minLines,
- TextEditingController? controller,
- String? error,
- OptimusInputErrorVariant errorVariant = OptimusInputErrorVariant.bottomHint,
- bool enableInteractiveSelection = true,
- bool autofocus = false,
- bool autocorrect = true,
- bool hasBorders = true,
- bool isRequired = false,
- bool? isFocused,
- bool isClearEnabled = false,
- Widget? suffix,
- Widget? prefix,
- Widget? leading,
- Widget? trailing,
- Key? inputKey,
- Key? fieldBoxKey,
- bool readOnly = false,
- VoidCallback? onTap,
- TextAlign textAlign = TextAlign.start,
- TextCapitalization textCapitalization = TextCapitalization.none,
- OptimusWidgetSize size = OptimusWidgetSize.large,
- bool? showCursor,
- bool showLoader = false,
- List<
TextInputFormatter> ? inputFormatters, - Brightness? keyboardAppearance,
- bool enableIMEPersonalizedLearning = true,
- bool enableSuggestions = true,
Implementation
const OptimusInputField({
super.key,
this.onChanged,
this.placeholder,
this.placeholderStyle,
this.keyboardType,
this.isPasswordField = false,
this.isEnabled = true,
this.textInputAction,
this.onSubmitted,
this.focusNode,
this.label,
this.caption,
this.captionIcon = OptimusIcons.info,
this.helperMessage,
this.maxLines = 1,
this.minLines,
this.controller,
this.error,
this.errorVariant = OptimusInputErrorVariant.bottomHint,
this.enableInteractiveSelection = true,
this.autofocus = false,
this.autocorrect = true,
this.hasBorders = true,
this.isRequired = false,
this.isFocused,
this.isClearEnabled = false,
this.suffix,
this.prefix,
this.leading,
this.trailing,
this.inputKey,
this.fieldBoxKey,
this.readOnly = false,
this.onTap,
this.textAlign = TextAlign.start,
this.textCapitalization = TextCapitalization.none,
this.size = OptimusWidgetSize.large,
this.showCursor,
this.showLoader = false,
this.inputFormatters,
this.keyboardAppearance,
this.enableIMEPersonalizedLearning = true,
this.enableSuggestions = true,
});