I would change how you are doing: Here an another way to do:
padding: const EdgeInsets.all(10),
child: 0 == 0 ? Column(
children: [
Align(child: Text('Showing all records'), alignment: Alignment.topLeft,),
Expanded(
child: const Center(
child: Text('No Records'),),
),
],
)
:ListView(
controller: controller,
children: [
Text('Showing all records'),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Container()
)
],
),
)),
),