Unverified Commit 5f18d0f7 authored by xster's avatar xster Committed by GitHub

Clarify various CupertinoTabView docs (#31109)

parent 829130dd
...@@ -20,8 +20,14 @@ import 'theme.dart'; ...@@ -20,8 +20,14 @@ import 'theme.dart';
/// pages as there are [tabBar.items]. Inactive tabs will be moved [Offstage] /// pages as there are [tabBar.items]. Inactive tabs will be moved [Offstage]
/// and their animations disabled. /// and their animations disabled.
/// ///
/// Use [CupertinoTabView] as the content of each tab to support tabs with parallel /// Use [CupertinoTabView] as the root widget of each tab to support tabs with
/// navigation state and history. /// parallel navigation state and history. Since each [CupertinoTabView] contains
/// a [Navigator], rebuilding the [CupertinoTabView] with a different
/// [WidgetBuilder] instance in [CupertinoTabView.builder] will not recreate
/// the [CupertinoTabView]'s navigation stack or update its UI. To update the
/// contents of the [CupertinoTabView] after it's built, trigger a rebuild
/// (via [State.setState], for instance) from its descendant rather than from
/// its ancestor.
/// ///
/// {@tool sample} /// {@tool sample}
/// ///
......
...@@ -57,6 +57,15 @@ class CupertinoTabView extends StatefulWidget { ...@@ -57,6 +57,15 @@ class CupertinoTabView extends StatefulWidget {
/// ///
/// If a [builder] is specified, then [routes] must not include an entry for `/`, /// If a [builder] is specified, then [routes] must not include an entry for `/`,
/// as [builder] takes its place. /// as [builder] takes its place.
///
/// Rebuilding a [CupertinoTabView] with a different [builder] will not clear
/// its current navigation stack or update its descendant. Instead, trigger a
/// rebuild from a descendant in its subtree. This can be done via methods such
/// as:
///
/// * Calling [State.setState] on a descendant [StatefulWidget]'s [State]
/// * Modifying an [InheritedWidget] that a descendant registered itself
/// as a dependent to.
final WidgetBuilder builder; final WidgetBuilder builder;
/// A key to use when building this widget's [Navigator]. /// A key to use when building this widget's [Navigator].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment