Skip to content

Instantly share code, notes, and snippets.

@diegoveloper
Created January 8, 2022 23:48
Show Gist options
  • Save diegoveloper/dfd14859aa43733792c2454d4cd0e932 to your computer and use it in GitHub Desktop.
Save diegoveloper/dfd14859aa43733792c2454d4cd0e932 to your computer and use it in GitHub Desktop.
class HomePageSliver extends StatelessWidget {
const HomePageSliver({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: CustomScrollView(
slivers: [
SliverAppBar(
expandedHeight: 200,
flexibleSpace: FlexibleSpaceBar(
background: Image.network(
'https://p4.wallpaperbetter.com/wallpaper/808/87/756/son-goku-dragon-ball-ultra-instinct-dragon-ball-super-white-hair-hd-wallpaper-preview.jpg',
fit: BoxFit.cover,
),
stretchModes: const [
StretchMode.blurBackground,
StretchMode.zoomBackground,
],
),
stretch: true,
),
SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
return ListTile(
title: Text('Index: $index'),
);
},
childCount: 40,
),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment