Added a NavgationBar example with nested Navigators (#98440)

This commit is contained in:
Hans Muller
2022-02-15 13:28:47 -08:00
committed by GitHub
parent 4ee22ed2bd
commit db4c98fcb0
3 changed files with 493 additions and 0 deletions

View File

@@ -59,6 +59,21 @@ import 'tooltip.dart';
/// ),
/// ),
/// ```
///
/// {@tool dartpad}
/// This example has a [NavigationBar] where each destination has its
/// own Navigator, Scaffold, and Appbar. That means that each
/// destination has an independent route history and (app bar) back
/// button. A [Stack] is used to display one destination at a time and
/// destination changes are handled by cross fade transitions. Destinations
/// that have been completely faded out are [Offstage].
///
/// One can see that the appearance of each destination's dialogs, bottom sheet,
/// list scrolling state, and text field state, persist when another destination
/// is selected.
///
/// ** See code in examples/api/lib/material/navigation_bar/navigation_bar.0.dart **
/// {@end-tool}
class NavigationBar extends StatelessWidget {
/// Creates a Material 3 Navigation Bar component.
///