Docsity

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

Toggle sidebar
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 :