Make TextTheme attributes non-nullable.#67673
Closed
gspencergoog wants to merge 1 commit intoflutter:masterfrom
Closed
Make TextTheme attributes non-nullable.#67673gspencergoog wants to merge 1 commit intoflutter:masterfrom
gspencergoog wants to merge 1 commit intoflutter:masterfrom
Conversation
TextTheme attributes non-nullable.
gspencergoog
commented
Oct 8, 2020
Contributor
Author
There was a problem hiding this comment.
This is the main change in this PR: all the others are just cascading changes from this.
23eaf76 to
d32f9ac
Compare
TextTheme attributes non-nullable.d32f9ac to
3a63f3c
Compare
Contributor
Author
|
Actually, the asserts that I thought protected this change, don't actually do what I thought they did, so this is actually changing the way themes work. We can try again to make it non-nullable once we remove the deprecated APIs. Closing this. |
Contributor
|
@gspencergoog they have been removed now. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This changes the
TextThemevalues for themes to all be non-nullable instead of nullable. The constructor allows for either the legacy names or the new names to be used, but in the end, because of asserts, one or the other of them must be defined. Because of that, it's allowable to provide a default-constructedTextStyleas a fallback if both are null (which can't happen), so that the values can all be non-nullable.Tests