Closed cs-nuuk closed 1 year ago
Thanks!
I assume its fine, but if we merge this does it now require using flutter 3.3+ or is it still backwards compatible with 3.0?
I can successfully build the project with Flutter 3.0.2, so I assume this change is backwards compatible.
@cs-nuuk Could you please fill in this contribution agreement? https://docs.google.com/forms/d/e/1FAIpQLScErfiz-fXSPpVZ9r8Di2Tr2xDFxt5MgzUel0__9vqUgvko7Q/viewform
What do these changes do?
With Flutter 3.3 you have to annotate methods that will be used from native code with
@pragma('vm:entry-point')
. I've added this annotation to_backgroundMessageIsolateCallback()
.Why are these changes necessary?
When you use this plugin with Flutter 3.3 you will get the following error message with release builds.
This happens because the compiler does not know that you call this function from native code so it removes it.
How did you verify these changes?
Build the example app as release with Flutter 3.3 and view the logs. The error message will be gone.
Anything else a reviewer should know?