Skip to content

Conversation

balvinderz
Copy link
Contributor

@balvinderz balvinderz commented Oct 14, 2020

Description

Adds web support for share_plus plugin.

Related Issues

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. Updating the pubspec.yaml and changelogs is not required.

  • 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.
  • 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.

@balvinderz
Copy link
Contributor Author

@mhadaily can you please review this.

@mhadaily mhadaily self-requested a review October 14, 2020 12:42
@mhadaily mhadaily added the share_plus Feature, Enhancement, Bug Fixes for Share Plus Plugin label Oct 14, 2020
@mhadaily
Copy link
Member

@balvinderz thanks for the great contribution, I will review it shortly, before that, we would like to have integration and unit tests from the plugins. Can you please make sure you can write tests for this PR?

@balvinderz
Copy link
Contributor Author

balvinderz commented Oct 14, 2020

@mhadaily i have added the integration tests now.

@miquelbeltran
Copy link
Member

Hi @balvinderz can you share which command do you use to run the integration test?

@balvinderz
Copy link
Contributor Author

@miquelbeltran first open chromedriver at 4444 port . then be in test directory and then type this command .
flutter drive -d web-server --browser-name=chrome --target=test_driver/share_plus_web_integration.dart

@miquelbeltran
Copy link
Member

Thanks @balvinderz that worked for me.

@mhadaily what do you think?

Copy link
Member

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

Thanks! Should it also have dep/plugin entries in packages/share_plus/pubspec.yaml?

SharePlugin({@visibleForTesting html.Navigator debugNavigator})
: _navigator = debugNavigator ?? html.window.navigator;

Future<void> share(
Copy link
Member

Choose a reason for hiding this comment

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

@balvinderz
Copy link
Contributor Author

Thanks! Should it also have dep/plugin entries in packages/share_plus/pubspec.yaml?

@jpnurmi yes ,but if i add it now , the tests will fail because share_plus_web doesn't exist. so i was thinking of making another PR when this is merged.

@jpnurmi
Copy link
Member

jpnurmi commented Oct 26, 2020

Thanks! Should it also have dep/plugin entries in packages/share_plus/pubspec.yaml?

@jpnurmi yes ,but if i add it now , the tests will fail because share_plus_web doesn't exist. so i was thinking of making another PR when this is merged.

Ah, okay! 👍

Copy link
Member

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

Windows slipped in in a couple of places in the README, otherwise looks good!

@balvinderz
Copy link
Contributor Author

Fixed the typos

Copy link
Member

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

Thanks!

@jpnurmi jpnurmi merged commit ff5f7e4 into fluttercommunity:main Oct 26, 2020
@balvinderz balvinderz deleted the share_plus_web branch October 27, 2020 04:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

share_plus Feature, Enhancement, Bug Fixes for Share Plus Plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants