Nested Scaffolds Documentation Improvement (#66972)

This commit is contained in:
Madhur Maurya 2020-10-01 05:25:15 +05:30 committed by GitHub
parent 36fca52c0d
commit 2de1c8da47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -964,13 +964,17 @@ class _FloatingActionButtonTransitionState extends State<_FloatingActionButtonTr
/// ///
/// ### Nested Scaffolds /// ### Nested Scaffolds
/// ///
/// The Scaffold was designed to be the single top level container for /// The Scaffold is designed to be a top level container for
/// a [MaterialApp] and it's typically not necessary to nest /// a [MaterialApp]. This means that adding a Scaffold
/// scaffolds. For example in a tabbed UI, where the /// to each route on a Material app will provide the app with
/// [bottomNavigationBar] is a [TabBar] and the body is a /// Material's basic visual layout structure.
/// [TabBarView], you might be tempted to make each tab bar view a ///
/// scaffold with a differently titled AppBar. It would be better to add a /// It is typically not necessary to nest Scaffolds. For example, in a
/// listener to the [TabController] that updates the AppBar. /// tabbed UI, where the [bottomNavigationBar] is a [TabBar]
/// and the body is a [TabBarView], you might be tempted to make each tab bar
/// view a scaffold with a differently titled AppBar. Rather, it would be
/// better to add a listener to the [TabController] that updates the
/// AppBar
/// ///
/// {@tool snippet} /// {@tool snippet}
/// Add a listener to the app's tab controller so that the [AppBar] title of the /// Add a listener to the app's tab controller so that the [AppBar] title of the