-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate theme.dart to be null safe. #3633
Conversation
packages/devtools_app/lib/src/debugger/program_explorer_controller.dart
Outdated
Show resolved
Hide resolved
@@ -12,17 +12,6 @@ import 'package:flutter_test/flutter_test.dart'; | |||
void main() { | |||
group('Theme', () { | |||
ThemeData theme; | |||
test('can be used without override', () { | |||
theme = themeFor(isDarkTheme: true, ideTheme: null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of removing this test, why don't we just replace null
with IdeTheme()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of the test is to verify everything works with null. We do not need this validation any more.
Other tests here cover non-null cases. Makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case an empty IdeTheme would be the equivalent of what used to be null, in terms of testing the "without override" case. The "without override" case is where a user runs DevTools via dart devtools
instead of using the DevTools embedded in their IDE. So we still want to test the case where IdeTheme does not contain overrides for backgroundColor, foregroundColor, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
No description provided.