When i use SliverAppBar() in a CustomScrollView() then the SliverAppBar() floating:true is not working by the mouse scroll
CustomScrollView(
slivers: <Widget>[
SliverAppBar(
floating:true,
expandedHeight: 150.0,
flexibleSpace: const FlexibleSpaceBar(
title: Text('Available seats'),
),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.add_circle),
tooltip: 'Add new entry',
onPressed: () { /* ... */ },
),
]
),
SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
return ListTile(
title: Text('List Tile $index'),
);
}, childCount: 100),
),
],
),
I have solved the problem
Create a Class and give its name as you want.
Now use your class in as SliverAppBar()
Or you can see the DartPad example