[cross_file] Fix accidental constructor change#3131
[cross_file] Fix accidental constructor change#3131auto-submit[bot] merged 3 commits intoflutter:mainfrom
Conversation
In flutter#3095 I accidentally changed a constructor argument's nullability because of a misleading analyzer warning. That version has been retracted; this restores the original behavior.
|
The test is convoluted, but it works (and is arguably no more convoluted than the three-files-that-must-match structure of the class itself). |
|
Filed dart-lang/sdk#51196 for the false positive. Although it's not actually clear to me why XFileBase has a constructor at all. Do you know what the reason was? |
|
A humble suggestion, the code could be written as: XFile(
String super.path, {
String? mimeType,
...
}) { |
Indeed; fixed, and updated the PR description to reflect that the analyzer wasn't at all the problem. Thanks! |
@stuartmorgan I don't remember, my only suspicion is to attempt to mandate that all subclasses (at least) have a |
In #3095 I accidentally changed a constructor argument's nullability because I wasn't familiar with the correct variation of super parameters, and addressed a lint warning incorrectly. That version has been retracted; this restores the original behavior.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).