DEV Community

Cover image for Flutter Layout Hints
CodeGemz
CodeGemz

Posted on

Flutter Layout Hints

You can use this as a short cheat-sheet or play with the full code sample.

Full code of the example (https://gist.github.com/mdrobnych/d7c0037de78c23aec71b1627414ce65c)

If no local Flutter stuff installed - open a new project at FlutLab.io (https://flutlab.io) and copy/paste this code there.

MainAxisAlignment

mainAxisAlignment: MainAxisAlignment.start
Alt Text
mainAxisAlignment: MainAxisAlignment.center
Alt Text
mainAxisAlignment: MainAxisAlignment.end
Alt Text
mainAxisAlignment: MainAxisAlignment.spaceAround
Alt Text
mainAxisAlignment: MainAxisAlignment.spaceBetween
Alt Text
mainAxisAlignment: MainAxisAlignment.spaceEvenly
Alt Text

CrossAxisAlignment

crossAxisAlignment: CrossAxisAlignment.start
Alt Text
crossAxisAlignment: CrossAxisAlignment.center
Alt Text
crossAxisAlignment: CrossAxisAlignment.end
Alt Text
crossAxisAlignment: CrossAxisAlignment.stretch
Alt Text

Top comments (0)