Home > Back-end >  Where does the padding come from?
Where does the padding come from?

Time:10-28

On the screenshot you can see my code and the simulator. There is a "padding" or another border that I don't know where it comes from. I want that the Container (with the red background) is completely without padding / margin to all directions...

Code and screenshot

CodePudding user response:

the Container will take the height and width of the children if you don't specify their width and height. Since you do not want any spaces around, Easy hack for this:

Column(
 mainAxisAlignment: MainAxisAlignment.start,
 crossAxisAlignment: CrossAxisAlignment.start,
Container(
width: MediaQuery.of(context).size.width,
height: 'your desired height'
....
)
)
  • Related