PaneItem class
The item used by NavigationView to display the tiles.
On PaneDisplayMode.compact, only icon is displayed, and title is used as a tooltip. On the other display modes, icon and title are displayed in a Row.
This is the only NavigationPaneItem that is affected by NavigationIndicators
See also:
- PaneItemSeparator, used to group navigation items
- PaneItemHeader, used to label groups of items.
- PaneItemAction, the item used for execute an action on click
- PaneItemExpander, which creates hierarchical navigation
- Inheritance
-
- Object
- NavigationPaneItem
- PaneItem
- Implementers
Constructors
-
PaneItem({Widget? icon, Widget? body, Key? key, Widget? title, Widget? trailing, Widget? infoBadge, FocusNode? focusNode, bool autofocus = false, MouseCursor? mouseCursor, WidgetStateProperty<
Color?> ? tileColor, WidgetStateProperty<Color?> ? selectedTileColor, VoidCallback? onTap, bool enabled = true}) - Creates a pane item.
Properties
- autofocus → bool
-
True if this widget will be selected as the initial focus when no other
node in its scope is currently focused.
final
- body → Widget?
-
The body of the view attached to this tab.
final
- enabled → bool
-
Whether this pane item is disabled.
final
- focusNode → FocusNode?
-
An optional focus node to use as the focus node for this widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
The icon used by this item.
final
- infoBadge → Widget?
-
The info badge used by this item.
final
- key → Key?
-
The key used for the item itself.
finalinherited
- mouseCursor → MouseCursor?
-
The cursor for a mouse pointer when it enters or is hovering over the
widget.
final
- onTap → VoidCallback?
-
Called when the item is tapped, regardless of selected or not
final
- parent ↔ NavigationPaneItem?
-
The parent item of this item.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedTileColor
→ WidgetStateProperty<
Color?> ? -
The color of the tile when selected.
final
-
tileColor
→ WidgetStateProperty<
Color?> ? -
The color of the tile when unselected.
final
- title → Widget?
-
The title used by this item. If the display mode is top
or compact, this is shown as a tooltip. If it's open, this
is shown by the side of the icon.
final
- trailing → Widget?
-
The trailing widget used by this item. If the current display mode is
compact, this is not disaplayed
final
Methods
-
build(
{required BuildContext context, required bool selected, required VoidCallback? onPressed, required PaneDisplayMode? displayMode, required int itemIndex, bool? autofocus, bool showTextOnTop = true, int depth = 0}) → Widget - Builds the pane item widget for display in the navigation pane.
-
buildMenuFlyoutItem(
BuildContext context, [ValueChanged< PaneItem> ? onItemPressed]) → MenuFlyoutItemBase -
override
-
copyWith(
{Widget? title, Widget? icon, Widget? infoBadge, Widget? trailing, Widget? body, FocusNode? focusNode, bool? autofocus, MouseCursor? mouseCursor, WidgetStateProperty< Color?> ? tileColor, WidgetStateProperty<Color?> ? selectedTileColor, VoidCallback? onTap, bool? enabled}) → PaneItem - Creates a copy of this PaneItem with the given fields replaced.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited