Repository navigation
[cupertino] Remove redundant null arguments in Completer.complete - #193718
Conversation
This is work towards dart-lang/sdk#59150 Already merged "upstream" at flutter/packages#13008
There was a problem hiding this comment.
Code Review
This pull request updates several test cases in packages/flutter/test/cupertino/refresh_test.dart by changing mockHelper.refreshCompleter.complete(null) to mockHelper.refreshCompleter.complete(). I have no additional feedback to provide.
|
This pull request contains changes to Material or Cupertino, which are currently frozen in this repository. Changes should be made in Please refer to #188444 for instructions. |
1 similar comment
|
This pull request contains changes to Material or Cupertino, which are currently frozen in this repository. Changes should be made in Please refer to #188444 for instructions. |
navaronbracke
left a comment
There was a problem hiding this comment.
LGTM, although this will need an override code freeze label to land.
cc @Piinks
|
Please also make this change in cupertino_ui in flutter/packages 🙏 |
Already done! flutter/packages#13008 😁 |
|
Fab thank you! |
…utter#193718) This is work towards dart-lang/sdk#59150 The lint rule `avoid_redundant_argument_values` is being updated (https://dart-review.googlesource.com/c/sdk/+/491341) to also flag redundant `null` arguments passed to optional parameters whose default value is `null` (such as `Completer<void>.complete(null)`). Already merged "upstream" at flutter/packages#13008 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This is work towards dart-lang/sdk#59150
The lint rule
avoid_redundant_argument_valuesis being updated (https://dart-review.googlesource.com/c/sdk/+/491341) to also flag redundantnullarguments passed to optional parameters whose default value isnull(such asCompleter<void>.complete(null)).Already merged "upstream" at flutter/packages#13008
Pre-launch Checklist
///).[Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[flutter/website]: https://github.com/flutter/website
[breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md