Skip to content

Clarify various CupertinoTabView docs#31109

Merged
xster merged 2 commits intoflutter:masterfrom
xster:tab-doc
Apr 17, 2019
Merged

Clarify various CupertinoTabView docs#31109
xster merged 2 commits intoflutter:masterfrom
xster:tab-doc

Conversation

@xster
Copy link
Member

@xster xster commented Apr 16, 2019

Description

Let me know if this makes it a bit clearer

@xster xster requested a review from redbrogdon April 16, 2019 04:40
/// Use [CupertinoTabView] as the content of each tab to support tabs with parallel
/// navigation state and history.
/// Use [CupertinoTabView] as the root content of each tab to support tabs with
/// parallel navigation state and history. Since each [CupertinoTabView] nests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
"root content" => "root widget"
"nests" => "contains"
nix "inner" at the start of line 28.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

/// If a [builder] is specified, then [routes] must not include an entry for `/`,
/// as [builder] takes its place.
///
/// Updating the [builder]'s existing [WidgetBuilder] instance will not clear
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
Rebuilding a [CupertinoTabView] with a different [builder] will not clear its current navigation stack or update its descendants. Instead, trigger a rebuild from a widget lower in its subtree. This can be done via methods such as:

  • Calling [State.setState] on a descendant [StatefulWidget]'s [State] object.
  • Modifying an [InheritedWidget] from which a descendant has inherited.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with some tweaks. We're not technically triggering a rebuild from a 'widget' since Widget instances can't 'do' anything.

'from which a descendant has inherited' is technically right but might be a bit vague.

@Hixie Hixie added f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels. labels Apr 16, 2019
@xster xster merged commit 5f18d0f into flutter:master Apr 17, 2019
@xster xster deleted the tab-doc branch April 17, 2019 20:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants