Added new examples

This commit is contained in:
PoojaB26
2019-01-09 02:44:51 +05:30
parent 41f35b3841
commit 112980a6f9
4 changed files with 47 additions and 62 deletions

View File

@@ -4,26 +4,7 @@ class AppBarWidget extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: new Text("Title"),
actions: [
new IconButton(
icon: new Icon(Icons.search),
onPressed: () {},
),
],
iconTheme: IconThemeData(
color: Colors.white,
),
textTheme: TextTheme(
title: TextStyle(
color: Colors.white,
fontSize: 20.0
),
),
),
body: Container(),
appBar: AppBar(),
);
}

View File

@@ -6,20 +6,19 @@ class ButtonWidget extends StatelessWidget{
return Scaffold(
appBar: AppBar(),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FloatingActionButton(
backgroundColor: Colors.orange,
child: Icon(Icons.mic, size: 30.0, color: Colors.white,),
onPressed: (){}),
FloatingActionButton(
mini: true,
backgroundColor: Colors.green,
child: Icon(Icons.mic, size: 30.0, color: Colors.white,),
onPressed: (){}),
],
)
child: RaisedButton(
onPressed: (){},
color: Colors.yellow,
disabledTextColor: Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0)
),
elevation: 20.0,
splashColor: Colors.green,
highlightColor: Colors.red,
highlightElevation: 1.0,
child: Text("Raised Button"),
),
),
);
}

View File

@@ -11,26 +11,7 @@ class ColumnWidget extends StatelessWidget{
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Container(
color: Colors.yellow,
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
FlutterLogo(
size: 100.0,
colors: Colors.red,
),
Text("Child Two", style: bigStyle,),
Container(
color: Colors.blue,
height: 100.0,
width: 100.0,
)
],
),
body: Column(
)
);
}

View File

@@ -5,18 +5,11 @@ class ContainerWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.all(25.0),
decoration: FlutterLogoDecoration(),
),
body: Container(),
);
}
}
/*
* TODO Container containing Flutter Flutter
*
@@ -71,3 +64,34 @@ class ContainerWidget extends StatelessWidget {
* */
/*
* TODO Container with Alignment property
*
* Container(
margin: EdgeInsets.all(20.0),
width: double.infinity,
height: 300.0,
color: Colors.red,
alignment: Alignment.topRight,
padding: EdgeInsets.all(20.0),
child: FlutterLogo(size: 100.0,),
),
*
* */
/*
* TODO Container with Box Constraints
*
* Container(
margin: EdgeInsets.all(20.0),
constraints: BoxConstraints(
maxWidth: 400.0,
minWidth: 200.0
),
width: 50.0,
alignment: Alignment.topCenter,
child: Image.network('https://picsum.photos/500/400'),
),
*
* */