fluttercommunity / fluttercommunity/plus_plugins

[share_plus] Provide a way to check for sharing availability

Open
#867 1 comment 3 reactions 0 assignees View on GitHub
enhancement Hacktoberfest share_plus
Dominant language
Dart
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

## Use case

I have a cross-platform app with a share button, but sharing doesn't work on all platforms. For example, attempting to share in Chrome on macOS just opens a blank tab, as [some browsers do not support sharing](https://caniuse.com/mdn-api_navigator_share). I would like to be able to hide the "Share" button if it's not an option on the current platform.

## Proposal

Expose something like an `isSharingAvailable` method which would return true on most platforms, but can return false in scenarios such as the one mentioned above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.