Last active
December 2, 2020 09:31
-
-
Save littleironical/a41c17327ab1bcd0ffd0b359462788b6 to your computer and use it in GitHub Desktop.
This file contains 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
// TYPE1: This will show a provided color when pinned | |
flexibleSpace: FlexibleSpaceBar( | |
background: Image.network("https://wallpaperseven.com/wallpapers/Grey-Abstract-4k-Wallpaper-scaled.jpg", fit: BoxFit.cover,), | |
) | |
//TYPE2: This will show background image when pinned | |
flexibleSpace: Stack( | |
children: <Widget>[ | |
Positioned.fill( | |
child: Image.network( | |
"https://wallpaperseven.com/wallpapers/Grey-Abstract-4k-Wallpaper-scaled.jpg", | |
fit: BoxFit.cover, | |
) | |
) | |
], | |
), | |
//TYPE3: This will hide the content of flexibleSpace when pinned | |
flexibleSpace: FlexibleSpaceBar( | |
background: Stack( | |
children: <Widget>[ | |
Positioned.fill( | |
child: Image.asset( | |
"assets/banner.jpg", | |
fit: BoxFit.cover, | |
) | |
), | |
], | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment