Skip to content

Instantly share code, notes, and snippets.

@timbergus
Created June 7, 2019 09:54
Show Gist options
  • Save timbergus/21defb454fd71d0e33f4aa438d4b3e5e to your computer and use it in GitHub Desktop.
Save timbergus/21defb454fd71d0e33f4aa438d4b3e5e to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Scaffold(
appBar: AppBar(
title: Text('My Weather App'),
),
body: SafeArea(
child: Stack(
children: <Widget>[
Center(
child: Image.asset(
'assets/images/background.jpg',
width: size.width,
height: size.height,
fit: BoxFit.fill,
),
),
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
[...]
],
),
),
],
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment