FLUTTER SESSION #5 INSTRUCTOR:
Hussain Habibullah
VERTICAL LIST VIEW
List of elements aligned vertically.
ListView(
children:
[
Text(“Sun”),
Text(“Moon”),
Text(“Star”),
]
),
HORIZONTAL LIST VIEW
List of elements aligned vertically.
ListView(
scrollDirection: Axis.horizontal,
children:
[
Text(“0”),
Text(“1”),
Text(“2”),
….
]
),
GRID VIEW
List of elements aligned in a tabular form.
GridView(
children:
[
Container(child: Text(“FIRST”), ),
Container(child: Text(“SECOND”), ),
Container(child: Text(“THIRD”), ),
….
]
),
HORIZONTAL PAGE VIEW
List of pages aligned horizontally
PageView(
children:
[
Container(child: Text(“Page 1”), ),
Container(child: Text(“Page 2”), ),
Container(child: Text(“Page 3”), ),
….
]
),
VERTICAL PAGE VIEW
List of pages aligned vertically
PageView(
scrollDirection: Axis.vertical,
children:
[
Container(child: Text(“Page 1”), ),
Container(child: Text(“Page 2”), ),
Container(child: Text(“Page 3”), ),
….
]
),

ListView, PageView, GridView in Flutter

  • 1.
    FLUTTER SESSION #5INSTRUCTOR: Hussain Habibullah
  • 2.
    VERTICAL LIST VIEW Listof elements aligned vertically. ListView( children: [ Text(“Sun”), Text(“Moon”), Text(“Star”), ] ),
  • 3.
    HORIZONTAL LIST VIEW Listof elements aligned vertically. ListView( scrollDirection: Axis.horizontal, children: [ Text(“0”), Text(“1”), Text(“2”), …. ] ),
  • 4.
    GRID VIEW List ofelements aligned in a tabular form. GridView( children: [ Container(child: Text(“FIRST”), ), Container(child: Text(“SECOND”), ), Container(child: Text(“THIRD”), ), …. ] ),
  • 5.
    HORIZONTAL PAGE VIEW Listof pages aligned horizontally PageView( children: [ Container(child: Text(“Page 1”), ), Container(child: Text(“Page 2”), ), Container(child: Text(“Page 3”), ), …. ] ),
  • 6.
    VERTICAL PAGE VIEW Listof pages aligned vertically PageView( scrollDirection: Axis.vertical, children: [ Container(child: Text(“Page 1”), ), Container(child: Text(“Page 2”), ), Container(child: Text(“Page 3”), ), …. ] ),