plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

ShareResult.raw always returning null on Android

Open franzsilva opened this issue 3 years ago • 1 comments

System info

Platform the Issue occurs on: Plugin name: Share Plus Plugin version: 4.0.4

Steps to Reproduce

  1. Create a boilerplate flutter app
  2. include library
  3. include this portion of code
  Future<void> _share() async {
    await Share.shareWithResult(
            "Check this amazing offer https://google.com")
        .then((ShareResult value) => print(value.raw));
  }

Issue

When I try to get the information of the app that im sharing to, the ShareResult.raw value always returns null on android. On iOS It works perfectly.

Flutter doctor output

[✓] Flutter (Channel stable, 2.10.4, on macOS 12.3 21E230 darwin-arm, locale es-EC) • Flutter version 2.10.4 at /Users/franzsilva/Apps/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision c860cba910 (5 weeks ago), 2022-03-25 00:23:12 -0500 • Engine revision 57d3bac3dd • Dart version 2.16.2 • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at /Users/franzsilva/Library/Android/sdk • Platform android-31, build-tools 32.0.0 • Java binary at: /Users/franzsilva/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8309675/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.10.1

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] Android Studio (version 2021.1) • Android Studio at /Users/franzsilva/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8309675/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] Android Studio (version 2021.1) • Android Studio at /Users/franzsilva/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8193401/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.66.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.23.0

[✓] Connected device (3 available) • Pixel 5 (mobile) • 0C191FDD4004LZ • android-arm64 • Android 12 (API 32) • macOS (desktop) • macos • darwin-arm64 • macOS 12.3 21E230 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.127 ! Error: Sala is busy: Waiting to connect and unlock the device. Xcode will continue when Sala is finished. (code -10)

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found!

franzsilva avatar Apr 29 '22 17:04 franzsilva

Hi there, the raw property of ShareResult is of type String which is not nullable. Do you really get null or 'null'?

PS: sorry for only spotting this now

Coronon avatar Jul 06 '22 08:07 Coronon

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 Dec 28 '22 00:12 github-actions[bot]