Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[url_launcher] migrate url_launcher package to null safety #3148

Merged
merged 13 commits into from
Oct 21, 2020

Conversation

mvanbeusekom
Copy link
Contributor

Description

This pull request add null safety support to the url_launcher package.

The implementation depends on companion PR #3142 which add null safety support to the url_launcher_platform_interface package. Since PR #3142 isn't merged as of yet the dependency is currently based on a path reference, which should be fixed before merging this PR.

Related Issues

flutter/flutter#66395

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@google-cla google-cla bot added the cla: yes label Oct 13, 2020
@mvanbeusekom mvanbeusekom force-pushed the url_launcher_null_safety branch from f77d6db to b975b07 Compare October 14, 2020 07:54
@blasten
Copy link

blasten commented Oct 14, 2020

Let me know when this is ready to review

@mvanbeusekom
Copy link
Contributor Author

@blasten, it would be great if you can do a review on the code. I think everything looks good, I am just waiting on a reply from David regarding some information why the integration tests won't run (I think this is related to the changes in #3158 which adds nnbd support in the integration_test package).

@mvanbeusekom mvanbeusekom marked this pull request as ready for review October 15, 2020 16:01
@mvanbeusekom mvanbeusekom requested a review from mklim as a code owner October 15, 2020 16:01
@mvanbeusekom mvanbeusekom force-pushed the url_launcher_null_safety branch from 27d3835 to dc9a87a Compare October 15, 2020 16:08
@blasten
Copy link

blasten commented Oct 16, 2020

@mvanbeusekom would you mind rebasing your branch?

@@ -1,3 +1,7 @@
## 5.8.0-nullsafety
Copy link

Choose a reason for hiding this comment

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

why not 6.0.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the version number in the middle of the discussion we had for the url_launcher_platform_interface. Since for that plugin we settled on doing a major release I think it should be good to do it here as well.

So I updated the version to 6.0.0-nullsafety. Main argument the canLaunch and launch methods won't be returning an optional null value anymore (where in earlier versions this was a possibility).

include: ../../../analysis_options.yaml
analyzer:
enable-experiment:
- non-nullable
Copy link

Choose a reason for hiding this comment

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

end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -1,3 +1,7 @@
# 0.2.0-nullsafety
Copy link

Choose a reason for hiding this comment

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

do we need to do web as well? cc @ditman

Copy link
Member

Choose a reason for hiding this comment

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

I'm thankful this is migrated, however integration_tests aren't currently running.

Copy link
Member

Choose a reason for hiding this comment

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

circling back, you guys discussed offline to revert url_launcher_web. I'm fine with that. Thanks for the effort @mvanbeusekom!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ditman Maybe I can revert it back in this PR and open a second one just for the url_launcher_web package as draft and have it ready to go when all dependencies get fixed?

Copy link
Member

Choose a reason for hiding this comment

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

@mvanbeusekom that sounds great, that way all the effort doesn't go to waste! :)

@mvanbeusekom mvanbeusekom force-pushed the url_launcher_null_safety branch from b513bd2 to 138a960 Compare October 16, 2020 08:07
@mvanbeusekom
Copy link
Contributor Author

@mvanbeusekom would you mind rebasing your branch?

Thanks for the review, I rebased the branch and also processed your other feedback

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

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

LGTM

@mvanbeusekom mvanbeusekom deleted the url_launcher_null_safety branch November 2, 2020 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants