Unverified Commit f049f436 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Update AppBar docs to analyze sample code (#16634)

parent b1ecf1ea
...@@ -188,22 +188,23 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget { ...@@ -188,22 +188,23 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// For less common operations, consider using a [PopupMenuButton] as the /// For less common operations, consider using a [PopupMenuButton] as the
/// last action. /// last action.
/// ///
/// For example: /// ## Sample code
/// ///
/// ```dart /// ```dart
/// return new Scaffold( /// new Scaffold(
/// appBar: new AppBar( /// appBar: new AppBar(
/// title: new Text('Hello World'), /// title: new Text('Hello World'),
/// actions: <Widget>[ /// actions: <Widget>[
/// new IconButton( /// new IconButton(
/// icon: new Icon(Icons.shopping_cart), /// icon: new Icon(Icons.shopping_cart),
/// tooltip: 'Open shopping cart', /// tooltip: 'Open shopping cart',
/// onPressed: _openCart, /// onPressed: () {
/// // ...
/// },
/// ), /// ),
/// ], /// ],
/// ), /// ),
/// body: _buildBody(), /// )
/// );
/// ``` /// ```
final List<Widget> actions; final List<Widget> actions;
...@@ -767,11 +768,11 @@ class SliverAppBar extends StatefulWidget { ...@@ -767,11 +768,11 @@ class SliverAppBar extends StatefulWidget {
/// For less common operations, consider using a [PopupMenuButton] as the /// For less common operations, consider using a [PopupMenuButton] as the
/// last action. /// last action.
/// ///
/// For example: /// ## Sample code
/// ///
/// ```dart /// ```dart
/// return new Scaffold( /// new Scaffold(
/// body: new CustomView( /// body: new CustomScrollView(
/// primary: true, /// primary: true,
/// slivers: <Widget>[ /// slivers: <Widget>[
/// new SliverAppBar( /// new SliverAppBar(
...@@ -789,7 +790,7 @@ class SliverAppBar extends StatefulWidget { ...@@ -789,7 +790,7 @@ class SliverAppBar extends StatefulWidget {
/// // ...rest of body... /// // ...rest of body...
/// ], /// ],
/// ), /// ),
/// ); /// )
/// ``` /// ```
final List<Widget> actions; final List<Widget> actions;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment