OptimusInputField class
General input, used to allow users to enter data into the interface.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- OptimusInputField
Constructors
-
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? 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}) -
const
Properties
- autocorrect → bool
-
Whether to enable autocorrection.
final
- autofocus → bool
-
Whether this text field should focus itself if nothing else is already
focused.
final
-
final
-
final
- controller → TextEditingController?
-
final
- enableIMEPersonalizedLearning → bool
-
Whether to enable that the IME update personalized data such as typing
history and user dictionary data.
final
- enableInteractiveSelection → bool
-
final
- enableSuggestions → bool
-
Whether to show input suggestions as the user types.
final
- error → String?
-
final
- errorVariant → OptimusInputErrorVariant
-
The way error should be displayed. Will be set to the
OptimusInputErrorVariant.bottomHint if not provided.
final
- fieldBoxKey → Key?
-
final
- focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- hasBorders → bool
-
final
- hasError → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- helperMessage → Widget?
-
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
Optional input validation and formatting overrides.
final
- inputKey → Key?
-
final
- isClearEnabled → bool
-
If true, clear all button is enabled.
final
- isEnabled → bool
-
final
- isFocused → bool?
-
final
- isPasswordField → bool
-
final
- isRequired → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardAppearance → Brightness?
-
The appearance of the keyboard.
final
- keyboardType → TextInputType?
-
The type of keyboard to use for editing the text.
final
- label → String?
-
final
- leading → Widget?
-
An optional icon/image to display before the text.
final
- maxLines → int
-
The maximum number of lines to show at one time, wrapping if necessary.
final
- minLines → int?
-
The minimum number of lines to occupy when the content spans fewer lines.
final
-
onChanged
→ ValueChanged<
String> ? -
Called when the user initiates a change to the TextField's
value: when they have inserted or deleted text.
final
-
onSubmitted
→ ValueChanged<
String> ? -
final
- onTap → VoidCallback?
-
final
- placeholder → String?
-
final
- placeholderStyle → TextStyle?
-
final
- prefix → Widget?
-
An optional text to display before the input.
final
- readOnly → bool
-
Whether the text can be changed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCursor → bool?
-
Whether to show cursor.
final
- showLoader → bool
-
If true, displays OptimusCircleLoader.
final
- size → OptimusWidgetSize
-
final
- suffix → Widget?
-
An optional text to display after the text.
final
- textAlign → TextAlign
-
final
- textCapitalization → TextCapitalization
-
Configures how the platform keyboard will select an uppercase or
lowercase keyboard.
final
- textInputAction → TextInputAction?
-
final
- trailing → Widget?
-
An optional trailing interactive icon/image. If isPasswordField is true,
trailing will be replaced with a
_PasswordButton
.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< OptimusInputField> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited