Skip to content

Instantly share code, notes, and snippets.

@boriscy
Last active September 7, 2021 19:38
Show Gist options
  • Save boriscy/4ee2d0b07cacdc8bcf9ab670145b1704 to your computer and use it in GitHub Desktop.
Save boriscy/4ee2d0b07cacdc8bcf9ab670145b1704 to your computer and use it in GitHub Desktop.
Flutter Course
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.teal,
body: SafeArea(
child: Row(
//mainAxisSize: MainAxisSize.min,
//mainAxisAlignment: stretch,
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
color: Colors.red,
//child: Text('Child 1'),
width: 100,
//margin: EdgeInsets.symmetric(vertical: 20, horizontal: 20),
padding: EdgeInsets.all(10),
),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(width: 100, height: 100, color: Colors.yellow),
Container(width: 100, height: 100, color: Colors.green)
],
),
),
Container(
color: Colors.blue,
//child: Text('Child 3'),
width: 100,
padding: EdgeInsets.all(10),
),
],
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment