According to current documentation of flutter platfrom channel it seems only possible to call host (Native) from client (Dart) and then we get response from host. Is there any possiblity of its reverse, e.g. to call directly Client from host?
相关问题
- Flutter : Prepare list data from http request
- How to schedule an alarm on specific time in Flutt
- MappedListIterable is not a SubType
- 'firebase_messaging/FirebaseMessagingPlugin.h&
- What is the difference between generics and dynami
相关文章
- Observatory server failed to start - Fails to crea
- Flutter error retrieving device properties for ro.
- Adding Shadows at the bottom of a container in flu
- Flutter. Check if a file exists before loading it
- Flutter - http.get fails on macos build target: Co
- Receive share file intents with Flutter
- Do stateless widgets dispose on their own?
- How to clean your build with Flutter RP2 in Androi
Yes, this is possible using
MethodChannel
.You will to specify a call handler on your method channel by using
setMethodCallHandler
.As an example, the Java version of
MethodChannel
has theinvokeMethod
method just like the Dart class has. This means that you can useinvokeMethod
on all platform. If you are calling it from native, you will have to set a method call handler in Flutter and vise versa.On iOS it is exactly the same.