ResponsiveNav class
A responsive navigation bar.
It shows a NavigationBar on small screens and a NavigationRail on large screens.
The navigation bar consists of a list of navigation items. Each navigation item is a NavItem object.
It animates itself when the screen size changes.
You can customize the navigation style by using NavStyle class.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ResponsiveNav
Constructors
-
Creates a ResponsiveNav widget.
const
Properties
- appBar → PreferredSizeWidget?
-
Use this to display a AppBar above the NavigationRail and child.
final
- child → Widget
-
The Widget to display in the main content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- intialSelectedIndex → int?
-
The index of the item to select initially.
final
-
items
→ List<
NavItem> -
The items to display in the navigation bar.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- largeScreensWidth → double
-
The width of the screen at which the NavigationRail should be extended,
if shouldExtend is
true
.final -
The width of the screen at which the NavigationBar should be hidden
and the NavigationRail should be shown.
final
-
The visual styling of the navigation bar.
final
-
The callback for when the selected item changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldExtend → bool
-
Whether the navigation bar should be extended on large screens.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ResponsiveNav> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited