Skip to content

Instantly share code, notes, and snippets.

@chonghorizons
Last active November 27, 2021 01:10
Show Gist options
  • Save chonghorizons/fdd8c049f84e3329dcdbf515f40f3c9e to your computer and use it in GitHub Desktop.
Save chonghorizons/fdd8c049f84e3329dcdbf515f40f3c9e to your computer and use it in GitHub Desktop.
Empty Containers don't render for Flexible, Flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Empty Containers aren't rendered",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Column(
children: [
Container(color: Colors.cyan),
Container(color: Colors.teal),
Container(color: Colors.indigo),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment