Flutter Container and Scaffold Basics, Lab Reports of Computer Communication Systems

An introduction to two fundamental flutter widgets: the container and the scaffold. The container widget is used to create a rectangular area with customizable properties such as size, alignment, padding, and decoration. The scaffold widget is the basic building block of a flutter app, providing a structure for the app's ui with an appbar, a body, and other optional components. The document showcases a simple flutter app that demonstrates the usage of the container widget, including its properties like height, width, transform, margin, padding, alignment, and decoration. It also includes a brief mention of a second flutter project based on the scaffold class, indicating that the document covers the basics of these essential flutter widgets. This information could be useful for students or developers who are new to flutter and want to understand the foundations of building flutter applications.

Typology: Lab Reports

2020/2021

Uploaded on 07/14/2023

purva-jage
purva-jage 🇮🇳

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1] flutter first project based on container class properties :
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("Container example"),
),
body: Container(
height:100.0,
width:200.0,
transform: Matrix4.rotationZ(0.2),
margin:const EdgeInsets.all(20),
padding:const EdgeInsets.all(30),
alignment: Alignment.bottomLeft,
decoration: BoxDecoration( border: Border.all(color: Colors.purple,width: 3)),
// color : Colors.purple,
child: const Text("Hello! i am inside a container!",
style: TextStyle(fontSize: 9)),
),
),
);
}
}
2] flutter project based on scaffold class :

Partial preview of the text

Download Flutter Container and Scaffold Basics and more Lab Reports Computer Communication Systems in PDF only on Docsity!

1] flutter first project based on container class properties : import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: const Text("Container example"), ), body: Container( height:100.0, width:200.0, transform: Matrix4.rotationZ(0.2), margin:const EdgeInsets.all( 20 ), padding:const EdgeInsets.all( 30 ), alignment: Alignment. bottomLeft , decoration: BoxDecoration( border: Border.all(color: Colors. purple ,width: 3 )), // color : Colors.purple, child: const Text("Hello! i am inside a container!", style: TextStyle(fontSize: 9 )), ), ), ); } } 2] flutter project based on scaffold class :