Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clarify AppBar.actions #6700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions packages/flutter/lib/src/material/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,13 @@ class _AppBarExpandedHeight extends InheritedWidget {
///
/// See also:
///
/// * [Scaffold]
/// * [TabBar]
/// * [IconButton]
/// * [PopupMenuButton]
/// * [FlexibleSpaceBar]
/// * [Scaffold], which displays the [AppBar] in its [Scaffold.appBar] slot.
/// * [TabBar], which is typically placed in the [bottom] slot of the [AppBar]
/// if the screen has multiple pages arranged in tabs.
/// * [IconButton], which is used with [actions] to show buttons on the app bar.
/// * [PopupMenuButton], to show a popup menu on the app bar, via [actions].
/// * [FlexibleSpaceBar], which is used with [flexibleSpace] when the app bar
/// can expand and collapse.
/// * <https://material.google.com/layout/structure.html#structure-toolbars>
class AppBar extends StatelessWidget {
/// Creates a material design app bar.
Expand Down Expand Up @@ -172,11 +174,29 @@ class AppBar extends StatelessWidget {
/// of the app.
final Widget title;

/// Widgets to display after the title widget.
/// Widgets to display after the [title] widget.
///
/// Typically these widgets are [IconButton]s representing common operations.
/// For less common operations, consider using a [PopupMenuButton] as the
/// last action.
///
/// For example:
///
/// ```dart
/// return 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,
/// ),
/// ]
/// ),
/// body: _buildBody(),
/// );
/// ```
final List<Widget> actions;

/// This widget is stacked behind the toolbar and the tabbar and it is not
Expand Down