Homework 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Homework-1 with ElevatedButton

void main() {
runApp(MaterialApp(
home: Scaffold(
appBar:AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[400],),
body:Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
ElevatedButton(child: Text("React.js"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red),),onPressed:(){},),
ElevatedButton( child: Text("Flutter"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red) ),onPressed:(){},),
ElevatedButton(child: Text("MySQL"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red) ),onPressed:(){},)
])),),));}
Homework-1 with container
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[500],),
body:Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Reacr.js',textAlign: TextAlign.center,)),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Flutter',textAlign: TextAlign.center,)),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('MySQL',textAlign: TextAlign.center,)),],),),),);}
Homework-1 with container
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[500],),
body:Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Reacr.js',textAlign: TextAlign.center,) ),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Flutter',textAlign: TextAlign.center,) ),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('MySQL',textAlign: TextAlign.center,) ), ], ),),),);
Homework-2 with ElevatedButton
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar:AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[400],),
body:Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ElevatedButton(child:Text("React.js"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red)),onPressed:(){},),
ElevatedButton( child: Text("Flutter"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red) ),onPressed:(){},),
ElevatedButton(child: Text("MySQL"),style: ButtonStyle(backgroundColor:
MaterialStateProperty.all<Color>(Colors.red) ),onPressed:(){},)
]
)
),
),
)
);
}
Homework-2 with container
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[500],),
body:Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Reacr.js',textAlign: TextAlign.center,) ),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Flutter',textAlign: TextAlign.center,)),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('MySQL',textAlign: TextAlign.center,)),],),),),);}
Homework-2 with container
void main() {
runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Flutter Row Homework'),
backgroundColor: Colors.blue[500], ),
body:Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Reacr.js',textAlign: TextAlign.center,) ),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('Flutter',textAlign: TextAlign.center,) ),
Container(
height: 50,
width: 50,
color:Colors.red ,
child: Text('MySQL',textAlign: TextAlign.center,)
), ], ),),),);}
Homework-3
void main() {
runApp((MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('Product List'),
backgroundColor: Colors.green, ),
body:Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
children:[
Container(
height: 100,
width: 100,
//color:Colors.red ,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
//color: Colors.blue,
image: DecorationImage(
image:NetworkImage('https://images.unsplash.com/photo-1496181133206-
80ce9b88a853?ixlib=rb-
1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8bGFwdG9wfGVufDB8fDB
8fA%3D%3D&auto=format&fit=crop&w=500&q=60'), ),),),
Container(
width: 250,
height: 100,
margin: EdgeInsets.all(14),
child: Text("Laptop",
style: TextStyle(
fontSize: 25,
color: Colors.black, ),),
alignment: Alignment.center,
color: Colors.white, ),],),
Row(
children:[
Container(
height: 100,
width: 100,
//color:Colors.red ,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
// color: Colors.blue,
image: DecorationImage(
image:NetworkImage('https://images.unsplash.com/photo-1510557880182-
3d4d3cba35a5?ixlib=rb-
1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aXBob25lfGVufDB8fDB8f
A%3D%3D&auto=format&fit=crop&w=500&q=60'),
),)
),
Container(
width: 250,
height: 100,
margin: EdgeInsets.all(14),
child: Text("Iphone",
style: TextStyle(
fontSize: 25,
color: Colors.black, ),),
alignment: Alignment.center,
color: Colors.white,),],),
Row(
children:[
Container(
height: 100,
width: 100,
//color:Colors.red ,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
//color: Colors.blue,
image: DecorationImage(
image:NetworkImage('https://images.unsplash.com/photo-1612442443556-
09b5b309e637?ixlib=rb-
1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8YW5kcm9pZHxlbnwwfHw
wfHw%3D&auto=format&fit=crop&w=500&q=60'), ),),),
Container(
width: 250,
height: 100,
margin: EdgeInsets.all(14),
child: Text("Android",
style: TextStyle(
fontSize: 25,
color: Colors.black ),),
alignment: Alignment.center,
color: Colors.white,),],),
Row(
children:[
Container(
height: 100,
width: 100,
//color:Colors.red ,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
//color: Colors.blue,
image: DecorationImage(
image:NetworkImage('https://images.unsplash.com/photo-1561154464-
82e9adf32764?ixlib=rb-
1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8aXBhZHxlbnwwfHwwfHw
%3D&auto=format&fit=crop&w=500&q=60'),
),),),
Container(
width: 250,
height: 100,
margin: EdgeInsets.all(14),
child: Text("Tablet",
style: TextStyle(
fontSize: 25,
color: Colors.black
),),
alignment: Alignment.center,
color: Colors.white,
),
],),
Row(
children:[

Container(
height: 100,
width: 100,
//color:Colors.red ,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
//color: Colors.blue,

image: DecorationImage(
image:NetworkImage('https://th.bing.com/th/id/OIP.2bXzdU7tnuyVtyG5ORpT9w
HaHa?w=187&h=187&c=7&r=0&o=5&dpr=1.25&pid=1.7'),
),),),
Container(
width: 250,
height: 100,
margin: EdgeInsets.all(14),
child: Text("Desktope",
style: TextStyle(
fontSize: 25,
color: Colors.black
),),
alignment: Alignment.center,
color: Colors.white, ), ],), ], ), ),)),);}
Homework-4
void main() {
runApp((MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('FlutterBeads',
style: TextStyle(
fontSize: 30,
color: Colors.black,

),),
centerTitle: true,
backgroundColor: Colors.greenAccent,
),
body: Center(
child: Container(
alignment: Alignment.center,
color: Colors.white,
child: Stack(
children: [
Container(
color: Colors.red,
width: 300,
height: 300,
margin: EdgeInsets.fromLTRB(0, 150, 150, 150),
),
Container(
color: Colors.deepPurple,
width: 300,
height: 300,
margin: EdgeInsets.fromLTRB(150, 0, 0, 300),
),
Container(
color: Colors.yellow,
width: 300,
height: 320,
margin: EdgeInsets.fromLTRB(40, 400, 20, 0),), ], ), ),),), ), ), );}

You might also like