@@ -125,11 +125,13 @@ class _AppBarExpandedHeight extends InheritedWidget {
125
125
///
126
126
/// See also:
127
127
///
128
- /// * [Scaffold]
129
- /// * [TabBar]
130
- /// * [IconButton]
131
- /// * [PopupMenuButton]
132
- /// * [FlexibleSpaceBar]
128
+ /// * [Scaffold] , which displays the [AppBar] in its [Scaffold.appBar] slot.
129
+ /// * [TabBar] , which is typically placed in the [bottom] slot of the [AppBar]
130
+ /// if the screen has multiple pages arranged in tabs.
131
+ /// * [IconButton] , which is used with [actions] to show buttons on the app bar.
132
+ /// * [PopupMenuButton] , to show a popup menu on the app bar, via [actions] .
133
+ /// * [FlexibleSpaceBar] , which is used with [flexibleSpace] when the app bar
134
+ /// can expand and collapse.
133
135
/// * <https://material.google.com/layout/structure.html#structure-toolbars>
134
136
class AppBar extends StatelessWidget {
135
137
/// Creates a material design app bar.
@@ -172,11 +174,29 @@ class AppBar extends StatelessWidget {
172
174
/// of the app.
173
175
final Widget title;
174
176
175
- /// Widgets to display after the title widget.
177
+ /// Widgets to display after the [ title] widget.
176
178
///
177
179
/// Typically these widgets are [IconButton] s representing common operations.
178
180
/// For less common operations, consider using a [PopupMenuButton] as the
179
181
/// last action.
182
+ ///
183
+ /// For example:
184
+ ///
185
+ /// ```dart
186
+ /// return new Scaffold(
187
+ /// appBar: new AppBar(
188
+ /// title: new Text('Hello World'),
189
+ /// actions: <Widget>[
190
+ /// new IconButton(
191
+ /// icon: new Icon(Icons.shopping_cart),
192
+ /// tooltip: 'Open shopping cart',
193
+ /// onPressed: _openCart,
194
+ /// ),
195
+ /// ]
196
+ /// ),
197
+ /// body: _buildBody(),
198
+ /// );
199
+ /// ```
180
200
final List <Widget > actions;
181
201
182
202
/// This widget is stacked behind the toolbar and the tabbar and it is not
0 commit comments