Skip to content

Commit

Permalink
Centering ListView.
Browse files Browse the repository at this point in the history
  • Loading branch information
fwrhine committed Nov 22, 2020
1 parent c095b05 commit 3f70c82
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:convert';
String apiKey = "142286faa5bd8ccf1ae8df60bef70179";

void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
title: "Weather App",
home: Home(),
));
Expand Down Expand Up @@ -50,14 +51,13 @@ class _HomeState extends State<Home> {
return Scaffold(
body: Column(children: <Widget>[
Container(
height: MediaQuery.of(context).size.height / 1.5,
height: MediaQuery.of(context).size.height / 3 * 2,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topRight,
colors: [Colors.yellow, Colors.pink])),
// color: Color(0xFFff9C19),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand All @@ -83,7 +83,9 @@ class _HomeState extends State<Home> {
fontSize: 50.0,
fontWeight: FontWeight.w400)),
])),
Expanded(
Container(
height: MediaQuery.of(context).size.height / 3,
width: MediaQuery.of(context).size.width,
child: Padding(
padding: EdgeInsets.only(left: 20.0, right: 20.0),
child: ListView(
Expand Down

0 comments on commit 3f70c82

Please sign in to comment.