September 2019
Beginner
512 pages
12h 52m
English
The task of positioning a child widget in a container, such as a Stack widget, for example, is done by using other widgets. Flutter provides widgets for very specific tasks. Centering a widget inside a container is done by wrapping it into a Center widget. Aligning a child widget relative to a parent can be done with the Align widget, where you specify the desired position through its alignment property. Another useful widget is Padding, which allows us to specify a space around the given child. The functionalities of these widgets are aggregated in the Container widget, which combines those common positioning and styling widgets to apply them to a child directly, making the code much cleaner and shorter.
Read now
Unlock full access