Last active
July 16, 2020 10:08
-
-
Save knezzz/adec4f226948d4937c850de97337b8a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MaterialApp(home: new MyApp())); | |
| } | |
| class MyApp extends StatefulWidget { | |
| MyApp({Key key}) : super(key: key); | |
| @override | |
| _MyAppState createState() => _MyAppState(); | |
| } | |
| class _MyAppState extends State<MyApp> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| body: SingleChildScrollView( | |
| child: Container( | |
| constraints: BoxConstraints(minHeight: MediaQuery.of(context).size.height), | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
| children: const <Widget>[ | |
| _Card(), | |
| SizedBox(height: 20.0), | |
| _Card(), | |
| SizedBox(height: 20.0), | |
| _Card(), | |
| ], | |
| ), | |
| ), | |
| ), | |
| ); | |
| } | |
| } | |
| class _Card extends StatelessWidget { | |
| const _Card({Key key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| color: Colors.red, | |
| height: 100.0, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment