Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

RenderBox was not laid out: RenderRepaintBoundary#09022 relayoutBoundary

The following assertion was thrown during paint():
RenderBox was not laid out: RenderRepaintBoundary#09022 relayoutBoundary=up1 NEEDS-PAINT
‘package:flutter/src/rendering/box.dart’:
Failed assertion: line 1979 pos 12: ‘hasSize’

The following assertion was thrown during performResize():
Vertical viewport was given unbounded height.
Viewports expand in the scrolling direction to fill their container. In this case, a vertical viewport was given an unlimited amount of vertical space in which to expand. This situation typically happens when a scrollable widget is nested inside another scrollable widget.
If this widget is always nested in a scrollable widget there is no need to use a viewport because there will always be enough vertical space for the children. In this case, consider using a Column instead. Otherwise, consider using the "shrinkWrap" property (or a ShrinkWrappingViewport) to size the height of the viewport to the sum of the heights of its children.

Hello everyone, this has already been applied before, everything worked, but now I’m getting an error that my list gets an unlimited height. What is the problem?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

In Flowers.shoppingBasket – an array consisting of words (pieces 5 +-)

Flowers.shoppingBasket = await SharedPreferencesUtil.getData<StringList>("header");

return Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Center(
            child: Column (
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Container(
                      width: 500,
                      height: 650,
                      child: 
ListView.builder(
  controller: controller,
  padding: EdgeInsets.all(5),
  itemCount: Flowers.shoppingBasket!.length,
  itemBuilder: (context, index) {
    if (index < Flowers.shoppingBasket!.length)  {
      return Container(
        padding: EdgeInsets.all(5),
        margin: EdgeInsets.all(2),
        decoration: const BoxDecoration(
            border: Border(bottom: BorderSide(color: Colors.black))
        ),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Container(
              width: 200,
              child: Column(
                children: [
                  Container(
                    margin: EdgeInsets.all(5),
                    child: Text(' ${Flowers.shoppingBasket?[index]}', style: TextStyle(fontSize: 15),),
                  ),

                ],
              ),
            ),

          ],
        ),

      );

    } else {
   ............
     
    }
  }
)

>Solution :

Wrap your ListView.builder with Expanded widget.

Expanded(
  child: ListView.builder(
      padding: EdgeInsets.all(5),

I will recommend to check this video

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading