Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

RenderBox Size Isse Exception caught by rendering library #69

Closed
AbdulRMohsen opened this issue Jun 3, 2020 · 2 comments
Closed

RenderBox Size Isse Exception caught by rendering library #69

AbdulRMohsen opened this issue Jun 3, 2020 · 2 comments

Comments

@AbdulRMohsen
Copy link

AbdulRMohsen commented Jun 3, 2020

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)),
        ],
    ),
),
@RyosukeOK
Copy link

I checked this, @amohsen1001 's solution is valid.

@diego-lipinski-de-castro

Can you make a pull request?

@fayaz07 fayaz07 closed this as completed Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants