Answers for "Failed assertion: 'constraints.hasBoundedWidth': is not true."

0

Failed assertion: 'constraints.hasBoundedWidth': is not true.

You need to wrap your child with some height and width as some of the child are
exceeding the available height and width. you can use media query and get the 
avaailable height and width :

final _mediaQuery = MediaQuery.of(context).size;

Container(
  width: _mediaQuery.width,
  height: _mediaQuery.height * 0.4,
  child: ...
  ....
)

############ OR #############

Simply wrap your Column in Expanded Widget: that way your Column will try to 
occupy available space in the parent Row.

Expanded(
	child: Column()
    ....
    ....
)
Posted by: Guest on April-25-2021

Code answers related to "Failed assertion: 'constraints.hasBoundedWidth': is not true."

Browse Popular Code Answers by Language