Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Conversation

@a14n
Copy link
Contributor

@a14n a14n commented Apr 15, 2020

Description

Following my comment on the initial PR there are some cases with behaviour changes. For instance the following change doesn't display the same thing (you can try it in dartpad):

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Column(
        children: [
-          ColoredBox(color: Colors.red, child: Container(height: 80)),
+          ColoredBox(color: Colors.red, child: SizedBox(height: 80)),
          SizedBox(height: 80),
-          ColoredBox(color: Colors.blue, child: Container(height: 80)),
+          ColoredBox(color: Colors.blue, child: SizedBox(height: 80)),
        ],
      ),
    );
  }
}

Basically it works with a child or with both width and height.

@a14n
Copy link
Contributor Author

a14n commented Apr 15, 2020

/cc @domesticmouse

@domesticmouse
Copy link
Contributor

@a14n thanks for the clarification, much appreciated

Copy link
Contributor

@pq pq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💎

@pq pq merged commit a77e9a2 into dart-archive:master Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

5 participants