1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2025-11-08 12:39:17 +00:00

fix: issue #1

This commit is contained in:
Nishant Srivastava
2018-05-29 00:50:33 +02:00
parent c98848ffb6
commit 4cd2d05216

View File

@@ -17,15 +17,7 @@ class MyApp extends StatelessWidget {
final TextStyle myTextStyle =
new TextStyle(color: Colors.grey, fontSize: myTextSize);
return new Scaffold(
appBar: new AppBar(
title: new Text("Stateless Widget"),
),
body: new Container(
// Sets the padding in the main container
padding: const EdgeInsets.only(bottom: 2.0),
child: new Center(
child: new Column(
var column = new Column(
// Makes the cards stretch in horizontal axis
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
@@ -37,15 +29,14 @@ class MyApp extends StatelessWidget {
style: myTextStyle,
),
// Setup the icon
icon: new Icon(Icons.favorite,
size: myIconSize, color: Colors.red)),
icon:
new Icon(Icons.favorite, size: myIconSize, color: Colors.red)),
new MyCard(
title: new Text(
"Alarm",
style: myTextStyle,
),
icon: new Icon(Icons.alarm,
size: myIconSize, color: Colors.blue)),
icon: new Icon(Icons.alarm, size: myIconSize, color: Colors.blue)),
new MyCard(
title: new Text(
"Airport Shuttle",
@@ -58,13 +49,23 @@ class MyApp extends StatelessWidget {
"Done",
style: myTextStyle,
),
icon: new Icon(Icons.done,
size: myIconSize, color: Colors.green)),
icon: new Icon(Icons.done, size: myIconSize, color: Colors.green)),
],
);
return new Scaffold(
appBar: new AppBar(
title: new Text("Stateless Widget"),
),
body: new Container(
// Sets the padding in the main container
padding: const EdgeInsets.only(bottom: 2.0),
child: new Center(
child: new SingleChildScrollView(child: column),
),
),
);
;
}
}