-
-
Notifications
You must be signed in to change notification settings - Fork 973
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]: SharewithResult always returning null in Android #916
Comments
having the same issue with the latest package version. @santhoshvgts 4.0.4 of share_plus is working properly for me, but the current one isnt |
@Letalus I tried 4.0.4 but same issue |
Hi there, The definition of the raw property is as follows: final String raw; The dart null safety guarantees that the Please explain your issue a bit clearer :) |
shareWithresult fallback to share if the result is null |
I am currently very short on time but will probably find some at the end of the month. When I last tried this I wasn’t able to reproduce this. Would you guys mind sharing a sample project for me to be on the same page? I am only able to test with the android emulator as I am not in possession of a real android device. |
I had the same problem when running on Android 11, but Android 10 was normal |
print(result.raw == "null");//true |
@Coronon |
I have the same problem in version 4.4.0 final res = await Share.shareWithResult('some text',subject: title);
|
@aakash-pamnani Thanks for your hint. Sadly, my PC broke and I was unable to work on this with my old Macbook. I expect to be able to look into the issue this weekend. As I don’t have an android device the hint that the new Android version might have something to do with it is greatly appreciated :) |
@Coronon |
@aakash-pamnani If I remember correctly, there was a problem with the |
Finally got around to look into this and was able to reproduce it - now looking into a fix. |
Okay, so I finally got a fix working that resolves the issue and cleans up the little callback-hell, while protecting us from any integrity issues a It is really late at night for me, so I'll clean up my changes tomorrow to then submit a PR :) PS: It really is a nightmare to debug this with an Android emulator on a Mid 2012 Macbook Air lol |
As I just submitted my PR, I would love for everyone to try out the changes to see if they fix the issue outside my simulator. As always, I provide share_plus_example as a pre-setup example project for this PR. dependency_overrides:
share_plus:
git:
url: https://github.com/Coronon/plus_plugins
ref: 488a27c5a6ca2cadb1a27591b5c17a1986cbd8b1
path: packages/share_plus/share_plus
share_plus_platform_interface:
git:
url: https://github.com/Coronon/plus_plugins
ref: 488a27c5a6ca2cadb1a27591b5c17a1986cbd8b1
path: packages/share_plus/share_plus_platform_interface |
Its working @Coronon |
Platform
Android 11
Plugin
share_plus
Version
4.0.8
Flutter SDK
3.0.2
Steps to reproduce
Code Sample
No response
Logs
Flutter Doctor
The text was updated successfully, but these errors were encountered: