Reputation: 19
i'm trying to test flutter app on ipad pro in debug mode and showing error of "A RenderFlex overflowed by 453 pixels on the right." and if i use singlechildlistview then show blank screen.
Here is the code:
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
children: [
SvgPicture.asset(
"assets/icons/ic_location.svg",
height: 24,
),
SizedBox(
width: 5,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: Get.width / 4,
height: 12,
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(4)),
),
Icon(
Icons.keyboard_arrow_down,
color: Colors.black,
size: 16,
)
],
),
SizedBox(
height: 8,
),
Container(
width: Get.width - 100,
height: 12,
decoration: BoxDecoration(
color: color, borderRadius: BorderRadius.circular(4)),
),
SizedBox(
height: 8,
),
],
),
],
),
)
Upvotes: 0
Views: 46
Reputation: 1
Parent of SingleChildScrollView
is needed to give a solution.
But I can assume, you have some other widget at the left to show, which causing the issue.
Remove SingleChildScrollView
from the child and Wrap the parent widget with SingleChildScrollView
.
Upvotes: 0