plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Bug]: there is a discrepancy in returned statuses—ShareResultStatus.dismissed on Android versus ShareResultStatus.success on iOS—when using the copy button

Open ibtissamwannas opened this issue 2 years ago • 2 comments

When using the share_plus package's Share.shareWithResult function, there's a discrepancy in the resulting status between the Android and iOS platforms. Specifically, when clicking the copy button, Android typically returns a status of ShareResultStatus.dismissed, whereas on iOS, it usually returns ShareResultStatus.success. Even the result.raw is empty when click the copy button on android while on iOS it gives : com.apple.UIKit.activity.CopyToPasteboard

Additionally, when sharing via email or any other social link without actually sending the email, on Android, I receive ShareResultStatus.success, while on iOS, I get ShareResultStatus.dismissible if I simply open the email without sending it.

I am using flutter 3.7.3 and share_plus ^7.2.1

  @override
  shareProfile(BuildContext context) async {
    final text = "this is text";
    final box = context.findRenderObject() as RenderBox?;
    var result = await Share.shareWithResult(
        sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
        "$text");

    print(result.status);
    print(result.raw);
}

@vbuberen

ibtissamwannas avatar Nov 20 '23 10:11 ibtissamwannas

Please read the API documentation that this is expected behavior to have different behavior between Android and iOS: https://pub.dev/documentation/share_plus/latest/share_plus/Share/shareWithResult.html

Also, don't tag people for no reason, especially when you have just opened the issue.

vbuberen avatar Nov 20 '23 13:11 vbuberen

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Feb 19 '24 00:02 github-actions[bot]