You are on page 1of 3

UOL

CHENAB CAMPUS

DEPARTMENT OF COMPUTER SCIENCE & IT

NAME: ASAD AMJAD

CLASS: BSCS-7

SAP: 70059627

SUBMITTED TO: MR. QAMMAR UD DIN

DATE: 21-12-2021
ROW AND COLUMN INSIDE CONTAINER AND SCAFFOLD:

container_row_col.dart:

import 'package:flutter/material.dart';

class ContainerRowCol extends StatefulWidget {


@override
_ContainerRowColState createState() => _ContainerRowColState();
}

class _ContainerRowColState extends State<ContainerRowCol> {


@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black,
foregroundColor: Colors.amber,
centerTitle: true,
title: Text("MY APP")),
body: Container(
padding: const EdgeInsets.all(20),
alignment: Alignment.center,
child: Row(
children: [
Column(
children: [
Text(
"data col 1",
style: TextStyle(fontSize: 20),
),
Text("data col 1", style: TextStyle(fontSize: 20))
],
),
SizedBox(
width: 30,
),
Column(
children: [
Text("data col 2", style: TextStyle(fontSize: 20)),
Text("data col 2", style: TextStyle(fontSize: 20))
],
),
],
),
),
);
}
}

Main.dart

import 'package:flutter_application_1/container_row_col.dart';

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

class MyApp extends StatefulWidget {


@override
_MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {


@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(primarySwatch: Colors.blue),
title: 'Asads App',
home: ContainerRowCol());
}
}

You might also like