RenderBox Size Isse Exception caught by rendering library
AbdulRMohsen opened this issue · comments
When using a long nested tree, a problem with the RenderBox size.
RenderBox was not laid out: RenderCustomPaint#0654b relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
RenderFlex children have non-zero flex but incoming height constraints are unbounded.
I was able to solve this issue by replacing the Expanded
with Flexible
in progress_dialog.dart on line 229. But I could only change it using a static customBody,
so if you can change it in your library now it will be so great. So that we can all have control over the default library dynamic body content.
customBody: Container(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const SizedBox(width: 8.0),
Align(
alignment: Alignment.centerLeft,
child: SizedBox(
width: 60.0,
height: 60.0,
child: Image.asset(
'assets/double_ring_loading_io.gif',
package: 'progress_dialog',
),
),
),
const SizedBox(width: 8.0),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(height: 8.0),
Expanded(
child: Row(
children: <Widget>[
Expanded(
child: Text("message",
style: TextStyle(
color: Colors.black,
fontSize: 17.0,
fontWeight: FontWeight.w600))),
],
),
),
SizedBox(height: 4.0),
Align(
alignment: Alignment.bottomRight,
child: Text("12.0/100",
style: TextStyle(
color: Colors.black,
fontSize: 13.0,
fontWeight: FontWeight.w400)),
),
],
),
),
),
const SizedBox(width: 8.0)
],
),
],
),
),
Please update it ASAP.
Solution is:
Expanded( //<== This need to be replaced by a Flexible(
child: Row(
children: <Widget>[
Expanded(
child: Text(_dialogMessage,
style: _messageStyle)),
],
),
),
I checked this, @amohsen1001 's solution is valid.
Can you make a pull request?