StacNavigationView class
A Stac widget that displays one of its children based on the active
index provided by a NavigationScope (established by a
StacDefaultNavigationController).
Generic replacement for StacBottomNavigationView — works with any
navigation widget (bottomNavigationBar, navigationBar, etc.).
{@tool snippet} Dart Example:
StacDefaultNavigationController(
length: 3,
child: StacScaffold(
body: StacNavigationView(
children: const [
StacCenter(child: StacText('Home')),
StacCenter(child: StacText('Search')),
StacCenter(child: StacText('Profile')),
],
),
bottomNavigationBar: StacNavigationBar(
destinations: [
StacNavigationDestination(icon: StacIcon(icon: 'home'), label: 'Home'),
StacNavigationDestination(icon: StacIcon(icon: 'search'), label: 'Search'),
StacNavigationDestination(icon: StacIcon(icon: 'account_circle'), label: 'Profile'),
],
),
),
)
{@end-tool}
- Inheritance
-
- Object
- StacElement
- StacWidget
- StacNavigationView
- Annotations
-
- @JsonSerializable.new()
Constructors
-
Creates a StacNavigationView.
const
-
Creates a StacNavigationView from a JSON map.
factory
Properties
-
children
→ List<
StacWidget> -
The list of pages that can be displayed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonData
→ Map<
String, dynamic> ? -
Raw JSON data for this widget
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Widget type identifier.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this StacNavigationView instance to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited