Issue
Flutter has the MethodChannel for sending data from Flutter to Java/Kotlin. We can also return values in these calls. But what if I want to return data at random times from Java/Kotlin to Flutter?
I remember there is a kind of channel to send data from Java to Flutter, but I forgot its name
Solution
EventChannel or MethodChannel can be used to pass data from flutter to android and android to flutter. In your case android to flutter, you can read this blog: https://testfairy.com/blog/native-communication-with-a-callback-in-flutter/
Also, similar question as to this have been answered previously :
How to open and pass data from Native Android App to Flutter Android App?
How to send data to Flutter from native (Android)
Answered By - Just a Person
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.