Created
July 10, 2018 13:38
-
-
Save diegoveloper/d521309b047ef0f1c6f436d3cae7ddb1 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
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: NestedScrollView( | |
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { | |
return <Widget>[ | |
SliverAppBar( | |
expandedHeight: 200.0, | |
floating: false, | |
pinned: true, | |
flexibleSpace: FlexibleSpaceBar( | |
centerTitle: true, | |
title: Text("Collapsing Toolbar", | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 16.0, | |
)), | |
background: Image.network( | |
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350", | |
fit: BoxFit.cover, | |
)), | |
), | |
]; | |
}, | |
body: Center( | |
child: Text("Sample Text"), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment