Refer to Navigator.of(rootNavigator) in Cupertino tab widgets (#19130)

This commit is contained in:
xster 2018-07-09 12:31:43 -07:00 committed by GitHub
parent e08177155e
commit 17123f5312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -71,6 +71,11 @@ import 'bottom_tab_bar.dart';
/// )
/// ```
///
/// To push a route above all tabs instead of inside the currently selected one
/// (such as when showing a dialog on top of this scaffold), use
/// `Navigator.of(rootNavigator: true)` from inside the [BuildContext] of a
/// [CupertinoTabView].
///
/// See also:
///
/// * [CupertinoTabBar], the bottom tab bar inserted in the scaffold.

View File

@ -28,6 +28,10 @@ import 'route.dart';
/// These navigation properties are not shared with any sibling [CupertinoTabView]
/// nor any ancestor or descendant [Navigator] instances.
///
/// To push a route above this [CupertinoTabView] instead of inside it (such
/// as when showing a dialog on top of all tabs), use
/// `Navigator.of(rootNavigator: true)`.
///
/// See also:
///
/// * [CupertinoTabScaffold], a typical host that supports switching between tabs.