actions property

List<Widget>? actions
final

Widgets to display after the title widget.

Typically these widgets are IconButtons representing common operations. For less common operations, consider using a PopupMenuButton as the last action.

{@tool sample}

Scaffold(
  body: CustomScrollView(
    primary: true,
    slivers: <Widget>[
      SliverGradientAppBar(
        title: Text('Hello World'),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.shopping_cart),
            tooltip: 'Open shopping cart',
            onPressed: () {
              // handle the press
            },
          ),
        ],
      ),
      // ...rest of body...
    ],
  ),
)

{@end-tool}

Implementation

final List<Widget>? actions;