plus_plugins
plus_plugins copied to clipboard
[share_plus] [UPDATE] `shareFiles()` with default apps or specific[limited] desktop app. Windows only
Description
Currently Support WINDOWS only, checking for macOS and Linux.
- Added
ShareWithApp
param inshareFiles()
, which can open file with its data as input to specific list of apps or default app . - It skips browser requirement to launch an app on desktop.
- The supported apps in plugin is
NOTEPAD, NOTEPAD++, EDGE, PHOTOSHOP, MSPAINT, CHROME
orBY_DEFAULT_APP
will make file handle by system defaults app.
- Select File, it will open by default app handler by Windows or specific app mentioned. It will skip browser need to open desktop app.
Related Issues
Before sharing file was not available for desktop apps in plugin and browser launch was required to launch some basic app.
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.
- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
- [x] All existing and new tests are passing.
- [x] I updated the version in
pubspec.yaml
andCHANGELOG.md
. - [x] I updated/added relevant documentation (doc comments with
///
). - [x] The analyzer (
flutter analyze
) does not report any problems on my PR. - [x] I read and followed the [Flutter Style Guide].
- [x] 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).
- [x] No, this is not a breaking change.
This looks very interesting indeed!
However, I am not in favor of adding a new method that only works on Windows.
Is there a chance that this could be implemented within the call to Share.shareFiles
with an optional named parameter for Windows? (that defaults to "default app").
We have a rule in which we cannot accept features that only support one platform: https://github.com/fluttercommunity/plus_plugins/blob/main/CONTRIBUTING.md#-cannot-be-accepted
So we would encourage to either integrate this functionality in existing library methods (shareFiles
) or to create this as an independent package not part of share_plus
.
Hi @miquelbeltran , thanks for suggestion. I will move this to Share.shareFiles
with optional parameter of type ShareWithAppWindows
for Windows only.
Hi @miquelbeltran , code updated
feature moved to shareFiles()
, with optional param ShareWithApp appName;
windows only.
I will see for macos and linux support
There are formatting errors still, can you check those?
There are formatting errors still, can you check those?
solved
There are some tests failing as well, can you take a look at those? also, see if you can add new ones.
There are some tests failing as well, can you take a look at those? also, see if you can add new ones.
I tired to resolve multiple failed test for multiple packages in repo, but it results in more tests error. Can you check this?
I don't think the PR about share_plus
should make changes in other packages. According to logs from Github Actions tests which were failing before @miquelbeltran wrote a comment about it only failed for share_plus
. Thus, would ask to fix only tests which were failing for the changed plugin.
The tests in share_plus_platform_interface
are failing and should be fixed before merging.
Also, there's formatting issues affecting all packages, but that may be due to an upgrade in the Dart formatter. This can be seen here: https://github.com/fluttercommunity/plus_plugins/runs/5884414642?check_suite_focus=true
I am taking a look at the formatting issue directly on the main branch, yo don't need to fix those.
The tests in
share_plus_platform_interface
are failing and should be fixed before merging.Also, there's formatting issues affecting all packages, but that may be due to an upgrade in the Dart formatter. This can be seen here: https://github.com/fluttercommunity/plus_plugins/runs/5884414642?check_suite_focus=true
I am taking a look at the formatting issue directly on the main branch, yo don't need to fix those.
@miquelbeltran share_plus test resolved. Please check for formatting . Thanks
Thanks, currently pending on https://github.com/fluttercommunity/plus_plugins/pull/832
If you implement the feature for shareFiles
please also implement it for shareFilesWithResult
:)
We should also aim for no coverage regression here
@theshivamlko Do you still plan to update this PR and address all the feedback?
@theshivamlko Do you still plan to update this PR and address all the feedback?
Yes , I will update this week.
Hey! Due to changes in our contributor guidelines, all PRs should now:
- Have a title that follows the Conventional Commits format. e.g.
feat(package_name)!: feature description
-
DO NOT modify the CHANGELOG.md or the version in the
pubspec.yaml
. This is going to be an automated process now.
We would ask you kindly to update the PR following these changes.
Thanks!
We merged a share implementation for Windows already, so I understand that this PR is no longer necessary.
Thanks for your contribution @theshivamlko anyway, sorry we couldn't get this landed sooner.