Skip to content

Instantly share code, notes, and snippets.

@knezzz
Last active July 16, 2020 10:08
Show Gist options
  • Select an option

  • Save knezzz/adec4f226948d4937c850de97337b8a6 to your computer and use it in GitHub Desktop.

Select an option

Save knezzz/adec4f226948d4937c850de97337b8a6 to your computer and use it in GitHub Desktop.
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