Created
January 8, 2022 23:48
-
-
Save diegoveloper/dfd14859aa43733792c2454d4cd0e932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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