Fluent2ToolbarItem class
One part of a Fluent2Toolbar: a command (Fluent2ToolbarItem.button),
an on/off command (Fluent2ToolbarItem.toggle) or Fluent's
ToolbarDivider between groups (Fluent2ToolbarItem.divider). A
command is its glyph alone (named by its label for a screen reader) or,
with showLabel, its glyph and its words.
Fluent2ToolbarItem.button(icon: Fluent2Icons.share, label: 'Share', onPressed: share)
- Annotations
Constructors
-
A command:
icon, named bylabel, doingonPressed.const - Fluent2ToolbarItem.divider()
-
The hairline between two groups of commands.
const
-
Fluent2ToolbarItem.toggle({required IconData icon, required String label, required bool checked, required ValueChanged<
bool> ? onChanged, IconData? checkedIcon, bool showLabel = false}) -
An on/off command:
checkedwearscheckedIconon the subtle selected face; a press asksonChangedfor the other state.const
Properties
- checked → bool
-
Whether a toggle item is on.
final
- checkedIcon → IconData?
-
The glyph a toggle item shows while on; null keeps icon.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
The item's glyph; null for a word-only item.
final
- label → String?
-
The item's words, shown or read as its name.
final
-
onChanged
→ ValueChanged<
bool> ? -
Called with a toggle item's new state; null makes the item a plain button.
final
- onPressed → VoidCallback?
-
Called when the item is pressed; null puts it out of use.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLabel → bool
-
Draws the words after the glyph.
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