Updated the nested navigation NavigationBar example (#137788)
Updated the NavigationBar API doc that describes examples/api/lib/material/navigation_bar/navigation_bar.2.dart and made some cosmetic changes to the example to improve its appearance in Material 3. Also did a little gratuitous reformatting. Fixes #136125
This commit is contained in:
@@ -62,12 +62,18 @@ const double _kIndicatorWidth = 64;
|
||||
/// {@end-tool}
|
||||
///
|
||||
/// {@tool dartpad}
|
||||
/// This example shows a [NavigationBar] as it is used within a [Scaffold]
|
||||
/// widget when there are nested navigators that provide local navigation. The
|
||||
/// [NavigationBar] has four [NavigationDestination] widgets with different
|
||||
/// color schemes. The [onDestinationSelected] callback changes the selected
|
||||
/// item's index and displays a corresponding page with its own local navigator
|
||||
/// in the body of a [Scaffold].
|
||||
/// This example shows a [NavigationBar] within a main [Scaffold]
|
||||
/// widget that's used to control the visibility of destination pages.
|
||||
/// Each destination has its own scaffold and a nested navigator that
|
||||
/// provides local navigation. The example's [NavigationBar] has four
|
||||
/// [NavigationDestination] widgets with different color schemes. Its
|
||||
/// [onDestinationSelected] callback changes the selected
|
||||
/// destination's index and displays a corresponding page with its own
|
||||
/// local navigator and scaffold - all within the body of the main
|
||||
/// scaffold. The destination pages are organized in a [Stack] and
|
||||
/// switching destinations fades out the current page and
|
||||
/// fades in the new one. Destinations that aren't visible or animating
|
||||
/// are kept [Offstage].
|
||||
///
|
||||
/// ** See code in examples/api/lib/material/navigation_bar/navigation_bar.2.dart **
|
||||
/// {@end-tool}
|
||||
|
||||
Reference in New Issue
Block a user