widget background app bar
a background app bar plugin, use this plugin if you want to preserve background of sliver app bar when scrolling.
screenshots
don’t forget to tap + button 5 times
getting started
- import it:
import 'package:background_app_bar/background_app_bar.dart'
- replace your current flexiblespacebar (in the appbar or sliverappbar) to backgroundflexiblespacebar.
new sliverappbar(
expandedheight: _app_bar_size,
floating: false,
pinned: true,
snap: false,
elevation: 0.0,
backgroundcolor: colors.transparent,
flexiblespace: new backgroundflexiblespacebar(
title: new text( widget.title ),
centertitle: false,
titlepadding: const edgeinsets.only(left: 20.0, bottom: 20.0),
background: new cliprect(
child: new container(
child: new backdropfilter(
filter: new imagefilter.blur(sigmax: 5.0, sigmay: 5.0),
child: new container(
decoration: new boxdecoration(
color: colors.black.withopacity(0.5),
),
),
),
decoration: new boxdecoration(
image: decorationimage(
image: assetimage(
"images/bg.jpg",
),
fit: boxfit.fitwidth
)
),
),
),
),
)
Comments are closed.