-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Run pub get post-processing for each package in workspace #170517
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
base: master
Are you sure you want to change the base?
Conversation
if (list == null) { | ||
return <String>[]; | ||
} | ||
if (list is! List<Object?>) { |
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.
I think this function can just be if section
not being present is an error:
if (map case {section: final List<String>? list when map.containsKey(section)) {
return list ?? <String>[];
}
throw FormatException('Expected `$section` to be `List<String>?`, got `${map[section]}');
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.
When trying that i get: Key expressions in map patterns must be constants.
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.
Oh that's annoying... Honestly, I'd remove this helper and just use the pattern above in its place with the constant keys. This helper function is doing a lot of unnecessary checks.
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.
LGTM, but defer final approval to Ben.
Fixes #161927