Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save doug-orchard/b41d75cf67ff446c8fb9fbde9d1f7316 to your computer and use it in GitHub Desktop.
Save doug-orchard/b41d75cf67ff446c8fb9fbde9d1f7316 to your computer and use it in GitHub Desktop.
Boxes that are in the center boxes [ copy and past code into dartPad ]
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Row(
children: [
Container(color: Colors.red, width: 100),
Expanded(
child: Container(
color: Colors.teal,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(color: Colors.yellow, width: 100, height: 100),
Container(color: Colors.yellow.withAlpha(125), width: 100, height: 100),
],
),
),
),
Container(color: Colors.blue, width: 100),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment