Advertisement
Guest User

Untitled

a guest
Jul 14th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.49 KB | None | 0 0
  1. Scaffold(
  2.       body: NestedScrollView(
  3.         headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
  4.           return <Widget>[
  5.             SliverAppBar(
  6.               centerTitle: true,
  7.               expandedHeight: 200.0,
  8.               floating: true,
  9.               elevation: 0,
  10.               pinned: true,
  11.               backgroundColor: Colors.white,
  12.               flexibleSpace: FlexibleSpaceBar(
  13.                 centerTitle: true,
  14.                 title: DecoratedBox(
  15.                   decoration: BoxDecoration(
  16.                     color: Colors.green,
  17.                     borderRadius: BorderRadius.only(
  18.                       bottomLeft: Radius.circular(20),
  19.                       bottomRight: Radius.circular(20),
  20.                     ),
  21.                   ),
  22.                   child: Container(
  23.                     width: MediaQuery.of(context).size.width,
  24.                     child: Center(child: Text('Hello')),
  25.                   ),
  26.                 ),
  27.                 background: DecoratedBox(
  28.                   decoration: BoxDecoration(
  29.                     color: Colors.red,
  30.                     borderRadius: BorderRadius.only(
  31.                       bottomLeft: Radius.circular(20),
  32.                       bottomRight: Radius.circular(20),
  33.                     ),
  34.                   ),
  35.                 ),
  36.               ),
  37.             ),
  38.           ];
  39.         },
  40.         body: Center(
  41.           child: Text("Sample Text"),
  42.         ),
  43.       ),
  44.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement