Skip to content

migration guide for ColoredBox/container optimization - #3728

Merged
sfshaza2 merged 5 commits into
flutter:masterfrom
dnfield:master
Mar 6, 2020
Merged

sfshaza2 merged 5 commits into
flutter:masterfrom
dnfield:master

Conversation

@dnfield

@dnfield dnfield commented Feb 23, 2020

Copy link
Copy Markdown
Contributor

@googlebot googlebot added the cla: yes Contributor has signed the Contributor License Agreement label Feb 23, 2020

@sfshaza2 sfshaza2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this PR! Once we have an actual release, and it's added, we can merge.

Previously, this code would result in a widget heirarchy that used a
`BoxDecoration` to actually paint the background color. The `BoxDecoration`
widget covers many cases other than just painting a background color, and is
not as efficient as the new `ColoredBox` widget which only paints a background

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

widget which => widget, which

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done


Widget tests that wanted to assert based on the color of a container in the
widget tree would previously have to find the `BoxDecoration` to actually get
the color of the container. Now, they will be able to check the `color` property

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

now they will be => now they are

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done


## Timeline

This change was introduced in v1.TBD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We no longer merge breaking changes until they have landed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right - I'll update this once the change has actually landed and I have a version number

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thx!

Relevant PRs:
* [Colored box and container optimization #50979][]

{% comment %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove the comment markers and the text that introduces them. thx

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@dnfield
dnfield requested a review from sfshaza2 March 5, 2020 21:17
@dnfield

dnfield commented Mar 5, 2020

Copy link
Copy Markdown
Contributor Author

Resolved the merge conflict and updated the version number. @sfshaza2 PTAL

@sfshaza2 sfshaza2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sfshaza2
sfshaza2 merged commit c4af085 into flutter:master Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Contributor has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants