GitHub

    Table of contents

  1. 示例
  2. 相关链接

SliverAppBar

Edit this page

A material design app bar that integrates with a CustomScrollView.

示例

Scaffold(
  body: CustomScrollView(
    slivers: <Widget>[
      SliverAppBar(
        expandedHeight: 150.0,
        flexibleSpace: const FlexibleSpaceBar(
          title: Text('SliverAppBar Sample'),
        ),
        actions: <Widget>[
          IconButton(
            icon: const Icon(Icons.add_circle),
            tooltip: 'Add new entry',
            onPressed: () {/* ... */},
          ),
        ],
      ),
      SliverList(
        delegate: SliverChildListDelegate(
          <Widget>[
            Container(height: 1200.0, color: Colors.teal),
          ],
        ),
      ),
    ],
  ),
)

相关链接