class Home extends StatelessWidget{
@override
Widget build(BuildContext context){
return new MediaQuery(
data: new MediaQueryData.fromWindow(ui.window),
child: new SafeArea(
child: new Material(
child: new CustomScrollView(
slivers: <Widget>[
new SliverPersistentHeader(
delegate: MyCustomAppBar(expandedHeight: 200),
pinned: true,
),
new SliverList(
delegate: SliverChildBuilderDelegate(
(_,index) => ListTile(
title: Text(
"Index: $index",
textDirection: TextDirection.ltr,
),
),
),
),
],
),
),
),
);
}
}
I am creating a custom scroll view but I am having the error and I can't understand from where it is generating?
I am using SliverPersistentHeaderDelegate class to create my custom appBar.