Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #3023

Open
8 tasks done
hoanganhnth opened this issue Jun 5, 2024 · 0 comments
Open
8 tasks done

[Bug]: #3023

hoanganhnth opened this issue Jun 5, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@hoanganhnth
Copy link

Platform

Android 10

Plugin

share_plus

Version

^8.0.3

Flutter SDK

3.22.1

Steps to reproduce

Crash app on android when transfer file
image

image

Code Sample

final result = await ShareUtils.shareFiles(
      [File("$directory/screenshot.png").path],
      subject: "Chia sẻ", 

s ShareUtils {
  static Future<void> share(
    String text, {
    String? subject,
    Rect? sharePositionOrigin,
  }) async {
    final result = await Share.share(text,
        subject: subject, sharePositionOrigin: sharePositionOrigin);
    // AppAnalyticService.share
    //     .logShareEvent(method: result.raw, contentType: 'text', itemId: text);
    return;
  }

  static Future<void> shareFiles(
    List<String> paths, {
    List<String>? mimeTypes,
    String? subject,
    String? text,
    Rect? sharePositionOrigin,
  }) async {
    final result = await Share.shareXFiles([
      XFile(
        paths[0],
      )
    ], subject: subject, text: text, sharePositionOrigin: sharePositionOrigin);
    // AppAnalyticService.share.logShareEvent(
    //     method: result.raw, contentType: 'image', itemId: paths.first);
    return;
  }
}

Logs

d

Flutter Doctor

flutter doctor -v

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@hoanganhnth hoanganhnth added bug Something isn't working triage labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant