How do I center an element in custom child scrollview silverlist?
return CustomScrollView(
physics: BouncingScrollPhysics(),
slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate([
SizedBox(height: widget.height),
HeaderTitle("Hello there"),
(data.length == 0)
? Center(
child: Container(
// padding: EdgeInsets.fromLTRB(0, 150, 0, 0),
child: Column(
children: [
Text("No Data Yet"),
OutlineButton(
onPressed: () {
Navigator.of(context).pop();
},
textColor: Colors.black,
child: Text("Do Something"),
),
],
),
),
)
: Container()
])),
SliverGrid(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
childAspectRatio: 10.0 / 10.0,
crossAxisCount: 2,
),
delegate:
SliverChildBuilderDelegate((BuildContext context, int index) {
return CastCard(data[index], null);
}, childCount: data.length),
),
],
);
I have tried to wrap with Center and Column with center property but the text No Date yet is not positioned in the cetner of the screen (with the remaining space available)

