I have a overflow issue. I have list view inside of 2 column which show overflow issue.
Widget getViewMethod() {
return Column(children: [
Container(color: ColorConst.whiteColor, height: 40),
getAppBarMediBot(),
const SizedBox(height: 10),
Card(
color: ColorConst.whiteColor,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(children: [
const ListTile(
leading: Icon(Icons.medical_services, size: 50),
title: Text('Medibot Box 1255'),
subtitle: Row(children: [
Text('Connected', style: TextStyle(color: Colors.green)),
SizedBox(width: 10),
Icon(Icons.battery_full, color: Colors.green),
Text('99%'),
])),
const SizedBox(height: 20),
SingleChildScrollView(
child: ListView.builder(
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemCount: 50,
itemBuilder: (BuildContext context, int index) {
return InkWell(
child: getTxtBlackColor(msg: "msg $index"));
}))
])))
]);
}
2
Answers
You can Wrap the second List (ListView.builder) in an Expanded widget instead of singleChildScrollView, which will take all remaining space in the screen and remove shrinkWrap optionally to improve performance.
Wrap your 1st
Column
insideSingleChildScrollView
try below code, add and replace your some code with my code like colors, widgets etc.Result Screen->