InputClearFeature class
Adds a clear button to the input field.
Provides a button that clears all text from the input when pressed. Commonly used to improve user experience by offering quick text removal.
Example:
TextField(
features: [
InputClearFeature(
position: InputFeaturePosition.trailing,
),
],
)
- Inheritance
-
- Object
- InputFeature
- InputClearFeature
Constructors
- InputClearFeature({InputFeatureVisibility visibility = InputFeatureVisibility.always, bool skipFocusTraversal = true, InputFeaturePosition position = InputFeaturePosition.trailing, Widget? icon})
-
Creates an InputClearFeature.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
Custom icon for the clear button.
final
- position → InputFeaturePosition
-
Position of the clear button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipFocusTraversal → bool
-
Whether to skip this feature in focus traversal.
finalinherited
- visibility → InputFeatureVisibility
-
Visibility mode for this input feature.
finalinherited
Methods
-
createState(
) → InputFeatureState< InputFeature> -
Creates the state for this input feature.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited