Hello Guys, how are you all? Hope you all are fine. You might face Flutter (Dart): Exceptions caused by rendering / A RenderFlex overflowed as this error in a flutter. Here I come with all possible solutions for this error.
we are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
How Flutter (Dart): Exceptions caused by rendering / A RenderFlex overflowed Error Occurs ?
How can I manage or apply scrolling ability to my app page view and avoid Flutter’s rendering exceptions with messages like:
A RenderFlex overflowed by 28 pixels on the bottom.
How to resolve my scrolling issue and RenderFlex overflowed by 28 pixels on the bottom. In my app.
How to solve Flutter: Exceptions Caused by rendering Or RenderFlex overflowed Error ?
I’d recommend either wrapping your entire content in a SingleChildScrollView
, or using a scrolling ListView
.
- How to solve Flutter: Exceptions Caused by rendering Or RenderFlex overflowed Error?
to solve Flutter: Exceptions Caused by rendering Or RenderFlex overflowed Error To resolve this error I'd recommend either wrapping your entire content in SingleChildScrollView Or use ListView. both widgets will solve your bottom overflowed exceptions.
- Flutter: Exceptions Caused by rendering Or RenderFlex overflowed
to solve Flutter: Exceptions Caused by rendering Or RenderFlex overflowed Error To resolve this error I'd recommend either wrapping your entire content in SingleChildScrollView Or use ListView. both widgets will solve your bottom overflowed exceptions.
Solution 1: Use SingleChildScrollView
To resolve this error I’d recommend either wrapping your entire content in SingleChildScrollView Or use ListView. both widgets will solve your bottom overflowed exceptions.
The Flutter SDK team puts a lot of effort into good documentation within the SDK code itself. One of the best resources for understanding the algorithm that Flex
widgets (Row
and Column
are both subclasses of Flex
) use to lay out their children is the DartDoc that accompanies the class itself:
Also Use This Tutorial By Flutter Official.
Solution 2: Column
wrapped in SingleChildScrollView
SingleChildScrollView(
child: Column(children: children),
)
Solution 3:ListView
ListView(
children: children
)
Solution 4: Column
and ListView
Both
combination of both Column
and ListView
(you should use Expanded
/Flexible
, or give a fixed height to the ListView
when doing so).
Column(
children: [
...children.take(2).toList(), // show first 2 children in Column
Expanded(
child: ListView(
children: children.getRange(3, children.length).toList(),
), // And rest of them in ListView
),
],
)
Solution 5: Use Flexible
or Expanded
try to wrap of Container
or any of other Widget
in Flexible
or Expanded
and it Will be done.
Do like this
Flexible(
child: Container(
padding: EdgeInsets.all(5),
height: 400,
width: double.infinity,
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: 4,
itemBuilder: (context, index) {
return ListTile(
title: Text("Tony Stark"),
subtitle: Text("A Iron Man"),
);
},
),
),
)
Solution 6: Use PreferredSize
PreferredSize(
preferredSize: Size.fromHeight(120.0),
child: //Your Child
)
Summery
So it’s all About All possible solutions. Hope this above all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.
Check Out Below Article
- cmdline-tools component is missing Error in Flutter
- The argument type ‘PointerEvent’ can’t be assigned to the parameter type ‘PointerDownEvent’
- How to Change Border Color of ElevatedButton in Flutter
- [Solved] Flutter-Unable to find bundled Java version after updated android studio Arctic Fox(2020.3.1) on M1 Apple Silicon
- How to show/hide password in TextFormField in flutter?
Leave a Reply