🙌🏻 立即获取「wordway」,由社区驱动的背单词应用,基于 Flutter 开发。🙌🏻

SliverAppBar

Edit this page

A material design app bar that integrates with a CustomScrollView.

Example

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),
          ],
        ),
      ),
    ],
  ),
)

Related Links