Skip to content

Make Theme.of non-nullable - #68922

Merged
goderbauer merged 2 commits into
flutter:masterfrom
goderbauer:theme
Nov 2, 2020
Merged

goderbauer merged 2 commits into
flutter:masterfrom
goderbauer:theme

Conversation

@goderbauer

@goderbauer goderbauer commented Oct 23, 2020 •

Copy link
Copy Markdown
Member

Note to reviewers: theme.dart contains the only interesting change. Everything else is mechanical removal of 280 !s.

Description

Make Theme.of non-nullable by removing the shadowThemeOnly param. That param has been replaced with InhertiedTheme.capture, see #69050.

Related Issues

Fixes #67163.

Tests

I added the following tests:

n/a

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@flutter-dashboard flutter-dashboard Bot added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. work in progress; do not review labels Oct 23, 2020
@google-cla google-cla Bot added the cla: yes label Oct 23, 2020
@goderbauer
goderbauer force-pushed the theme branch 2 times, most recently from 784891e to 4025649 Compare October 26, 2020 18:08

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

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.

This is necessary with NNBD?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

While our customers still run without NNBD we still need them.

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.

[InheritedTheme]s

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.

captures => captured

@goderbauer goderbauer mentioned this pull request Oct 26, 2020
9 of 13 tasks
@goderbauer goderbauer changed the title Theme Make Theme.of non-nullable Oct 28, 2020
@goderbauer
goderbauer marked this pull request as ready for review October 28, 2020 23:22
@goderbauer

Copy link
Copy Markdown
Member Author

"Google testing" failures are from an unrelated change.

@fluttergithubbot

Copy link
Copy Markdown
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Windows framework_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot

Copy link
Copy Markdown
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Windows tool_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

justprodev added a commit to justprodev/flutter_datetime_picker that referenced this pull request Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider Theme.of()! and other related topics

3 participants