Row Column

import "package:flutter/material.dart";
void main()
{
runApp(MyApp());
}
class MyApp extends StatelessWidget
{
MyApp({super.key});
@override
Widget build(BuildContext context)
{
return MaterialApp(
title: "Third Day",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.brown,
),
home: MyApplication3(),
);
}
}
class MyApplication3 extends StatefulWidget
{
MyApplication3({super.key});
@override
State<MyApplication3> createState()
{
return MyApplication3State();
}
}
class MyApplication3State extends State<MyApplication3>
{
@override
Widget build(BuildContext context)
{
return Scaffold(
appBar: AppBar(
title: const Text("Container in Flutter"),
centerTitle: true,
),
/// TASK 1
// body: SizedBox(
// width: double.infinity,
// height: double.infinity,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.red,
// ),
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.blue,
// ),
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.teal,
// ),
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.brown,
// ),
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.deepPurple,
// ),
// Container(
// width: 100.0,
// height: 100.0,
// color: Colors.green,
// ),
// ],
// ),
// ),

/// TASK 2
// body: SizedBox(
// width: double.infinity,
// height: double.infinity,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Container(
// width: 100.0,
// height: 1200.0,
// color: Colors.green,
// ),
// ],
// ),
// ),

/// TASK 3
// body: SizedBox(
// width: double.infinity,
// height: double.infinity,
// child: Row(
// // mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// width: 380.0,
// height: 100.0,
// color: Colors.indigo,
// ),
// ],
// ),
// ),

/// TASK 4
// body: SizedBox(
// width: double.infinity,
// height: double.infinity,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// width: 100.0,
// height: 600.0,
// color: Colors.teal,
// ),
// ],
// ),
// ),

/// TASK 5
body: SizedBox(
width: double.infinity,
height: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 100.0,
height: 100.0,
color: Colors.purple,
),
Container(
width: 100.0,
height: 100.0,
color: Colors.teal,
),
Container(
width: 100.0,
height: 100.0,
color: Colors.red,
),
],
),
),
);
}
}

Comments

Popular posts from this blog

ExpansionPanel with ExpansionPanelList with Complete Collapse Operation in Flutter

Pagination with Bloc Pattern in Flutter

Pagination First Practical in Flutter