CNPopUpButtonItem<T> class
A choice of a CNPopUpButton: the value it stands for and what the menu and the button show for it.
- Inheritance
-
- Object
- CNPopUpButtonEntry<
T> - CNPopUpButtonItem
Constructors
- CNPopUpButtonItem({required T value, required String label, CNSymbol? icon, CNImageAsset? imageAsset, bool enabled = true})
-
Creates a choice.
const
Properties
- enabled → bool
-
Whether the item can be chosen. A disabled item is shown dimmed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → CNSymbol?
-
Optional SF Symbol shown before the label. An imageAsset takes
precedence.
final
- imageAsset → CNImageAsset?
-
Optional image (SVG, PNG, JPG; a Flutter asset or bytes) shown before
the label, in place of icon.
final
- label → String
-
The item's title, in the menu and, while it is selected, on the button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The value CNPopUpButton.onChanged reports when this item is chosen,
compared with
==to CNPopUpButton.value.final
Methods
-
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