-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix int to long conversion #15
Conversation
@psovit Thank you for great work. What's your Flutter version? I think we need to keep it works both in Flutter 2 and Flutter 3. |
Hi @jiusanzhou , Here's my Flutter version info:
Please feel free to modify this merge request or handle the issue on your own way 👍 If you could update the plugin with the fix, that would be really helpful as I am currently in need of this package :) |
HI @jiusanzhou , |
@psovit ok, thank you for PR, I will do some recheck before publishing it in few days later. |
Hello @jiusanzhou, @psovit, I was checking the example app when I encountered the below error - logs of interest
Full Logs
In short, if you run the example app (with the I looked at the #3 and found this PR. Now the error says java.lang.Long cannot be cast to java.lang.Integer so I used the old cast i.e.
and conveniently the exception goes away as well. At all, I'm a bit confused. This PR should resolve the issue that was arising before, but now maybe it's raising another one or maybe not. Do let me know if I'm missing something here and excuse my insufficient knowledge on kotlin. |
Hi @mulaRahul Thank you for information, I think that is I had made some mistake on this fixing. I will retest it and try to figure it out. |
Fix for
java.lang.ClassCastException
in Flutter environment :sdk: ">=2.12.0 <3.0.0"
.Reference to issue: java.lang.ClassCastException in Flutter environment : sdk: ">=2.12.0 <3.0.0".
Solved by first casting to
Int?
and then toLong?
.