Skip to content

Instantly share code, notes, and snippets.

@eseidelGoogle
Last active January 9, 2020 23:04
Show Gist options
  • Save eseidelGoogle/f1f3e7a4317d098be0279da3abef33e4 to your computer and use it in GitHub Desktop.
Save eseidelGoogle/f1f3e7a4317d098be0279da3abef33e4 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage()
);
}
}
class MyHomePage extends StatelessWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
ListView(
children: <Widget>[
Container(
height: 4000,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [const Color (0xFF8E78FF) , const Color (0xFFBA7AC9), const Color (0xFF9D79ED), const Color (0xFFE97C91)],
begin: Alignment.topCenter,
end: Alignment(1,0),
stops: [1,0.3,0.7,0],
)
),
),
],
),
CustomScrollView(
slivers: <Widget>[
SliverAppBar(
expandedHeight: 400,
floating: true,
centerTitle: true,
title: Text("lasagna"),
elevation: 0,
forceElevated: true,
backgroundColor: Colors.transparent,
),
SliverList(
delegate: SliverChildListDelegate(
[
Material(
elevation: 4,
color: Colors.transparent,
child: Container(
height: 900,
color:Colors.white12,
),
),
Container(
height: 1000,
color:Colors.transparent
)
]
),
)
],
)
],
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment