Skip to content

Commit af0e01c

Browse files
authored
Fix AppBar doc to keep diagram next to its description (flutter#151937)
Also swap two paragraphs to keep related content together.
1 parent caaff4b commit af0e01c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/flutter/lib/src/material/app_bar.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ class _PreferredAppBarSize extends Size {
9292
/// appears in the toolbar when the writing language is left-to-right (e.g.
9393
/// English):
9494
///
95-
/// The [AppBar] insets its content based on the ambient [MediaQuery]'s padding,
96-
/// to avoid system UI intrusions. It's taken care of by [Scaffold] when used in
97-
/// the [Scaffold.appBar] property. When animating an [AppBar], unexpected
98-
/// [MediaQuery] changes (as is common in [Hero] animations) may cause the content
99-
/// to suddenly jump. Wrap the [AppBar] in a [MediaQuery] widget, and adjust its
100-
/// padding such that the animation is smooth.
101-
///
10295
/// ![The leading widget is in the top left, the actions are in the top right,
10396
/// the title is between them. The bottom is, naturally, at the bottom, and the
10497
/// flexibleSpace is behind all of them.](https://flutter.github.io/assets-for-api-docs/assets/material/app_bar.png)
@@ -110,6 +103,13 @@ class _PreferredAppBarSize extends Size {
110103
/// to false. In that case a null leading widget will result in the middle/title widget
111104
/// stretching to start.
112105
///
106+
/// The [AppBar] insets its content based on the ambient [MediaQuery]'s padding,
107+
/// to avoid system UI intrusions. It's taken care of by [Scaffold] when used in
108+
/// the [Scaffold.appBar] property. When animating an [AppBar], unexpected
109+
/// [MediaQuery] changes (as is common in [Hero] animations) may cause the content
110+
/// to suddenly jump. Wrap the [AppBar] in a [MediaQuery] widget, and adjust its
111+
/// padding such that the animation is smooth.
112+
///
113113
/// {@tool dartpad}
114114
/// This sample shows an [AppBar] with two simple actions. The first action
115115
/// opens a [SnackBar], while the second action navigates to a new page.

0 commit comments

Comments
 (0)