Answers for "RenderBox was not laid out:"

0

RenderBox was not laid out

//in using GridView consider using shrinkWrap
GridView.builder(
  itemCount: featuredCoursesData.length,
  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
  	crossAxisCount: (orientation == Orientation.portrait) ? 2 : 3),
  itemBuilder: (BuildContext context, int index) {
  return new Card(
    child: new GridTile(
    footer: new Text(featuredCoursesData[index].title),
    child: new Text(featuredCoursesData[index].instructor), //just for testing, will fill with image later
  	),
  );
  },
  shrinkWrap: true,
),
Posted by: Guest on June-17-2021
0

RenderBox was not laid out:

new Row(
      children: <Widget>[
        Expanded(
          child: SizedBox(
            height: 200.0,
            child: new ListView.builder(
              scrollDirection: Axis.horizontal,
              itemCount: products.length,
              itemBuilder: (BuildContext ctxt, int index) {
                return new Text(products[index]);
              },
            ),
          ),
        ),
        new IconButton(
          icon: Icon(Icons.remove_circle),
          onPressed: () {},
        ),
      ],
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
    )
Posted by: Guest on June-26-2021

Code answers related to "RenderBox was not laid out:"

Browse Popular Code Answers by Language