InputPasswordToggleFeature class

Adds a password visibility toggle feature to the input field.

Provides a button that allows users to toggle between showing and hiding password text. Supports both hold-to-reveal and toggle modes.

Example:

TextField(
  obscureText: true,
  features: [
    InputPasswordToggleFeature(
      mode: PasswordPeekMode.toggle,
    ),
  ],
)
Inheritance

Constructors

InputPasswordToggleFeature({InputFeatureVisibility visibility = InputFeatureVisibility.always, Widget? icon, Widget? iconShow, PasswordPeekMode mode = PasswordPeekMode.toggle, InputFeaturePosition position = InputFeaturePosition.trailing, bool skipFocusTraversal = true})
Creates an InputPasswordToggleFeature.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
icon Widget?
Icon to display when password is hidden.
final
iconShow Widget?
Icon to display when password is shown.
final
mode PasswordPeekMode
The mode for password peeking behavior.
final
position InputFeaturePosition
Position of the toggle 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