Skip to content

Remove unnecessary imports of 'package:collection' IterableExtension #3639

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

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

oprypin
Copy link
Contributor

@oprypin oprypin commented Jan 25, 2024

  • Replace .whereNotNull() with .nonNulls which is now in Dart core.
  • .firstOrNull, .lastOrNull, .singleOrNull and .elementAtOrNull(i) are also in Dart core and even under the same name, so simply drop the import of 'package:collection' whenever possible.

Not updating the changelog because there's 0 visible change to users.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

* Replace `.whereNotNull()` with `.nonNulls` which is now in Dart core.
* `.firstOrNull`, `.lastOrNull`, `.singleOrNull` and `.elementAtOrNull(i)` are also in Dart core and even under the same name, so simply drop the import of 'package:collection' whenever possible.
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srawlins srawlins merged commit 9a31dc1 into main Jan 25, 2024
@srawlins srawlins deleted the iterablex branch January 25, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants