0% found this document useful (0 votes)
5 views

Grid Builder

The document is a submission by Falak Shair for a Mobile Application Development lab task focused on creating a Grid Builder using Flutter. It includes a code snippet that implements a GridView with a list of items displayed in a grid format. The application features a simple user interface with icons and a blue tile color for each grid item.

Uploaded by

cdy8bcwm4p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Grid Builder

The document is a submission by Falak Shair for a Mobile Application Development lab task focused on creating a Grid Builder using Flutter. It includes a code snippet that implements a GridView with a list of items displayed in a grid format. The application features a simple user interface with icons and a blue tile color for each grid item.

Uploaded by

cdy8bcwm4p
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name :

Falak shair

Submitted to :
Sir Mudassir Rahman

Subject : Mobile Application Development

Lab Task Grid Builder


import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {


final abc = List.generate(38, (x) => 'XYZ $x');

@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('GridView')),
body: GridView.builder(
padding: EdgeInsets.all(20),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
),
itemCount: abc.length,
itemBuilder: (BuildContext context, int index) {
return GridTile(
child: ListTile(
leading: Icon(Icons.person),
title: Text(abc[index]),
trailing: Icon(Icons.call),
tileColor: Colors.blue,
),
);
},
),
),
);
}
}

You might also like