mirror of
https://github.com/flutter/flutter
synced 2024-09-21 17:22:30 +00:00
Update AppBar docs to analyze sample code (#16634)
This commit is contained in:
parent
b1ecf1ea9a
commit
f049f436c8
|
@ -188,22 +188,23 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
|
|||
/// For less common operations, consider using a [PopupMenuButton] as the
|
||||
/// last action.
|
||||
///
|
||||
/// For example:
|
||||
/// ## Sample code
|
||||
///
|
||||
/// ```dart
|
||||
/// return new Scaffold(
|
||||
/// new Scaffold(
|
||||
/// appBar: new AppBar(
|
||||
/// title: new Text('Hello World'),
|
||||
/// actions: <Widget>[
|
||||
/// new IconButton(
|
||||
/// icon: new Icon(Icons.shopping_cart),
|
||||
/// tooltip: 'Open shopping cart',
|
||||
/// onPressed: _openCart,
|
||||
/// onPressed: () {
|
||||
/// // ...
|
||||
/// },
|
||||
/// ),
|
||||
/// ],
|
||||
/// ),
|
||||
/// body: _buildBody(),
|
||||
/// );
|
||||
/// )
|
||||
/// ```
|
||||
final List<Widget> actions;
|
||||
|
||||
|
@ -767,11 +768,11 @@ class SliverAppBar extends StatefulWidget {
|
|||
/// For less common operations, consider using a [PopupMenuButton] as the
|
||||
/// last action.
|
||||
///
|
||||
/// For example:
|
||||
/// ## Sample code
|
||||
///
|
||||
/// ```dart
|
||||
/// return new Scaffold(
|
||||
/// body: new CustomView(
|
||||
/// new Scaffold(
|
||||
/// body: new CustomScrollView(
|
||||
/// primary: true,
|
||||
/// slivers: <Widget>[
|
||||
/// new SliverAppBar(
|
||||
|
@ -789,7 +790,7 @@ class SliverAppBar extends StatefulWidget {
|
|||
/// // ...rest of body...
|
||||
/// ],
|
||||
/// ),
|
||||
/// );
|
||||
/// )
|
||||
/// ```
|
||||
final List<Widget> actions;
|
||||
|
||||
|
|
Loading…
Reference in a new issue