Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Mobile computing lab3

Eng : hamada mostafa Eng : fatma mohammed


Lab3 content
u Text
u Container
u Image
u Row & Column
u Singlechildscrollview
u Listview
u Gridview
u Icon and iconbutton
u Expanded
u Statefulwidget & StatelessWidget
Text
u Is a visible widget
Container
u Container class can be used to store one or more widgets and position them on
the screen according to our convenience.
u like a box to store contents.
u Invisible widget
image
Row and Column

u These widgets let you align children horizontally and vertically as per the requirement.

u children: This property takes in List<Widget>, that is a list of widgets to display inside
the Row or the Column widget.

u crossAxisAlignment: The crossAxisAlignment takes in CrossAxisAlignment enum as the


object to how the children’s widgets should be places in crossAxisAlignment. For Row it is
vertical and for Column it is horizontal.

u direction: This property holds as the Axis enum object to decide the direction used in the main
axis. For Row and Column, it is fixed.

u mainAxisAlignment: This property takes in MainAxisAlignment enum as the object to decide


how the children widgets should be place in mainAxisAlignment. For Row it is horizontal and
for Column it is vertical.

u mainAxisSize: This property decides the size of main-axis by taking in MainAxisSize enum as
the object.
Row Column
Singlechildscrollview
Listview
ListView.builder
gridview
Icon and Iconbutton
Expanded
stateless stateful
u Stateless Widgets are static widgets. u Stateful Widgets are dynamic widgets.

u They do not depend on any data change u They can be updated during runtime based on user
or any behavior change. action or data change.

u Stateless Widgets do not have a state, u Stateful Widgets have an internal state and can re-
they will be rendered once and will not render if the input data changes or if Widget’s state
update themselves, but will only be changes.
updated when external data changes.
u For Example: Checkbox, Radio Button, Slider are
u For Example: Text, Stateful Widgets
Icon, RaisedButton are Stateless
u EX : create new project and see stateful widget
Widgets.
task with bonus
Thanks !

You might also like