Skip to content

[cupertino] Remove redundant null arguments in Completer.complete - #193718

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
kevmoo:cupertino-redundant-null
Oct 2, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
kevmoo:cupertino-redundant-null

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the AI contribution guidelines and understand my responsibilities, or I am not using AI tools.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant in-code documentation (doc comments with ///).
  • 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).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

[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

@kevmoo
kevmoo requested a review from dkwingsmt October 2, 2026 17:45
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 2, 2026

@gemini-code-assist gemini-code-assist Bot 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.

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.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: cupertino labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

This pull request contains changes to Material or Cupertino, which are currently frozen in this repository.

Changes should be made in material_ui and/or cupertino_ui in the flutter/packages repository.

Please refer to #188444 for instructions.

1 similar comment
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

This pull request contains changes to Material or Cupertino, which are currently frozen in this repository.

Changes should be made in material_ui and/or cupertino_ui in the flutter/packages repository.

Please refer to #188444 for instructions.

@kevmoo kevmoo added the override code freeze Override an active code freeze. label Oct 2, 2026

@navaronbracke navaronbracke 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, although this will need an override code freeze label to land.

cc @Piinks

@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 2, 2026
@Piinks

Piinks commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Please also make this change in cupertino_ui in flutter/packages 🙏

@kevmoo

kevmoo commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Please also make this change in cupertino_ui in flutter/packages 🙏

Already done! flutter/packages#13008 😁

@Piinks

Piinks commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Fab thank you!

@auto-submit
auto-submit Bot added this pull request to the merge queue Oct 2, 2026
Merged via the queue into flutter:master with commit 600c7a5 Oct 2, 2026
31 of 33 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 2, 2026
@kevmoo
kevmoo deleted the cupertino-redundant-null branch October 2, 2026 23:20
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD f: cupertino framework flutter/packages/flutter repository. See also f: labels. override code freeze Override an active code freeze.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants