Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created December 1, 2022 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/9e65bfa309deec244aea75c7023c70dc to your computer and use it in GitHub Desktop.
Save vijayinyoutube/9e65bfa309deec244aea75c7023c70dc to your computer and use it in GitHub Desktop.
class SliverAppBarBldr extends StatelessWidget {
const SliverAppBarBldr({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return SliverAppBar(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
elevation: 0,
pinned: true,
centerTitle: false,
stretch: true,
expandedHeight: 300.0,
flexibleSpace: const FlexibleSpaceBar(
stretchModes: [StretchMode.zoomBackground],
background: Image(
image: AssetImage('assets/Images/feature.png'),
fit: BoxFit.cover,
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment