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

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
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