3 ms·
If I am correct Flutter compiles to Dart code which compiles to Native code. Above I was more talking about platform integration. As Flutter their own document
by jurmous 3y ago
If I am correct Flutter compiles to Dart code which compiles to Native code.
Above I was more talking about platform integration. As Flutter their own document states everything within Dart is compiled to run like its own enclosed runtime environment. It talks with the native world with messages over channels.
https://docs.flutter.dev/platform-integration/platform-channels https://docs.flutter.dev/platform-integration/platform-chann...
Within Kotlin however it is possible to directly call the native method. So it looks like Flutter has more overhead for native communication than Kotlin.
Here for example a part of a C interop tutorial in Kotlin. You can directly work with data coming from C libraries.
https://kotlinlang.org/docs/mapping-primitive-data-types-from-c.html https://kotlinlang.org/docs/mapping-primitive-data-types-fro...
- fyzix 3y agoFlutter apps are written in dart which compiles to native code or js/wasm on web. Dart can interop with swift/obj-C/Java/Kotlin through the use of channels. Dart can interop with C/Rust/C++ directly through FFI[1] [1]: https://dart.dev/guides/libraries/c-interop https://dart.dev/guides/libraries/c-interop