Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
5f18d0f7
Unverified
Commit
5f18d0f7
authored
Apr 17, 2019
by
xster
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify various CupertinoTabView docs (#31109)
parent
829130dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
tab_scaffold.dart
packages/flutter/lib/src/cupertino/tab_scaffold.dart
+8
-2
tab_view.dart
packages/flutter/lib/src/cupertino/tab_view.dart
+9
-0
No files found.
packages/flutter/lib/src/cupertino/tab_scaffold.dart
View file @
5f18d0f7
...
...
@@ -20,8 +20,14 @@ import 'theme.dart';
/// pages as there are [tabBar.items]. Inactive tabs will be moved [Offstage]
/// and their animations disabled.
///
/// Use [CupertinoTabView] as the content of each tab to support tabs with parallel
/// navigation state and history.
/// Use [CupertinoTabView] as the root widget of each tab to support tabs with
/// 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}
///
...
...
packages/flutter/lib/src/cupertino/tab_view.dart
View file @
5f18d0f7
...
...
@@ -57,6 +57,15 @@ class CupertinoTabView extends StatefulWidget {
///
/// If a [builder] is specified, then [routes] must not include an entry for `/`,
/// 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
;
/// A key to use when building this widget's [Navigator].
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment