Skip to content

Remove invalid assert for TextHeightBehavior - #50603

Merged
GaryQian merged 4 commits into
flutter:masterfrom
GaryQian:thbfix
Feb 12, 2020
Merged

GaryQian merged 4 commits into
flutter:masterfrom
GaryQian:thbfix

Conversation

@GaryQian

Copy link
Copy Markdown
Contributor

Description

#48346 (comment) caught an extra assert that slipped in. Remove this.

null is a valid value for this and there should not be an assert here.

@GaryQian GaryQian self-assigned this Feb 11, 2020
@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 11, 2020
@fluttergithubbot

Copy link
Copy Markdown
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@justinmc justinmc 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, thanks for the quick fix!

ui.TextHeightBehavior get textHeightBehavior => _textHeightBehavior;
ui.TextHeightBehavior _textHeightBehavior;
set textHeightBehavior(ui.TextHeightBehavior value) {
assert(value != null);

@dnfield dnfield Feb 11, 2020 •

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 should add a test for this so someone doesn't "helpfully" add it back...

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.

(probably a very simple test with a link to the github issue for context)

@dnfield dnfield 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.

Needs a test.

@GaryQian

Copy link
Copy Markdown
Contributor Author

Done!

@dnfield dnfield 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

@GaryQian
GaryQian merged commit cad0814 into flutter:master Feb 12, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants