NavigationPane class

The pane used by NavigationView.

The NavigationView doesn't perform any navigation tasks automatically. When the user taps on a navigation item, onChanged, if non-null, is called.

See also:

  • NavigationView, used alongside this to navigate through pages
  • PaneDisplayMode, that defines how this pane is rendered
  • NavigationBody, the widget that implement transitions to the pages
Mixed in types

Constructors

Creates a navigation pane.

Properties

allItems List<NavigationPaneItem>
A list of all of the items displayed on this pane.
no setter
autoSuggestBox Widget?
An optional control to allow for app-level search. Usually an AutoSuggestBox
final
autoSuggestBoxReplacement Widget?
Used when the current display mode is PaneDisplayMode.compact as a replacement to autoSuggestBox. It's only displayed if autoSuggestBox is non-null.
final
customPane NavigationPaneWidget?
Creates a Custom pane that will be used
final
displayMode PaneDisplayMode
Use this property to customize how the pane will be displayed. PaneDisplayMode.auto is used by default.
final
effectiveItems List<PaneItem>
All the PaneItems inside allItems
no setter
footerItems List<NavigationPaneItem>
The footer items used by this panel. These items are displayed at the end of the panel and they can't be overflown.
final
hashCode int
The hash code for this object.
no setteroverride
The header of the pane.
final
indicator Widget?
A function called when building the navigation indicator
final
items List<NavigationPaneItem>
The items used by this panel. These items are displayed before autoSuggestBox and footerItems.
final
key Key?
final
leading Widget?
The leading Widget for the Pane
final
The menu button used by this pane.
final
onChanged ValueChanged<int>?
Called when the current index changes.
final
paneKey GlobalKey<State<StatefulWidget>>
The key for the pane view
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
The scroll behavior used by the pane when displayMode is PaneDisplayMode.compact and PaneDisplayMode.open.
final
scrollController ScrollController?
The scroll controller used by the pane when displayMode is PaneDisplayMode.compact and PaneDisplayMode.open.
final
selected int?
The current selected index.
final
selectedItem PaneItem
Get the current selected item
no setter
size NavigationPaneSize?
The size of the pane in its various mode.
final
toggleable bool
Whether the pane can be toggled or not.
final

Methods

changeTo(NavigationPaneItem item) → void
Changes the selected item to item.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
effectiveIndexOf(NavigationPaneItem item) int
Get the effective index of the navigation pane.
isSelected(NavigationPaneItem item) bool
Check if the provided item is selected on not.
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.
override

Static Methods

buildMenuButton(BuildContext context, Widget itemTitle, NavigationPane pane, {EdgeInsetsGeometry padding = EdgeInsets.zero, required VoidCallback onPressed}) Widget