Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scaffold(
- body: NestedScrollView(
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
- return <Widget>[
- SliverAppBar(
- centerTitle: true,
- expandedHeight: 200.0,
- floating: true,
- elevation: 0,
- pinned: true,
- backgroundColor: Colors.white,
- flexibleSpace: FlexibleSpaceBar(
- centerTitle: true,
- title: DecoratedBox(
- decoration: BoxDecoration(
- color: Colors.green,
- borderRadius: BorderRadius.only(
- bottomLeft: Radius.circular(20),
- bottomRight: Radius.circular(20),
- ),
- ),
- child: Container(
- width: MediaQuery.of(context).size.width,
- child: Center(child: Text('Hello')),
- ),
- ),
- background: DecoratedBox(
- decoration: BoxDecoration(
- color: Colors.red,
- borderRadius: BorderRadius.only(
- bottomLeft: Radius.circular(20),
- bottomRight: Radius.circular(20),
- ),
- ),
- ),
- ),
- ),
- ];
- },
- body: Center(
- child: Text("Sample Text"),
- ),
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement