DropDownModel<T> class

A generic model class for representing items in a dropdown menu.

This class is designed to store an item with a key, a value, and a display text. It also provides methods for equality comparison and string representation.

Constructors

Constructor for creating a DropDownModel instance.

Properties

disabled → bool
A boolean indicating whether the dropdown item is disabled.
final
disabledText → String?
A string that will be displayed when the dropdown item is disabled.
final
displayText → String
no setter
displayTextFormatter → String Function()?
final
hashCode → int
Returns a hash code based on the key.
no setteroverride
key → String
A unique identifier for the dropdown item.
final
prefixWidget → Widget?
A widget that will be displayed before the text in the dropdown
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtext → String?
The optional text that is displayed in the dropdown next to the main item text
final
text → String
The text that is displayed in the dropdown for this item.
final
value → T?
The associated value for the dropdown item. The type of value is generic T.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns the text representation of the item.
override

Operators

operator ==(Object other) → bool
Compares two DropDownModel objects based on their key.
override