Session
Faster Flutter: Access Native Code Directly with Dart FFI.
Flutter is a cross-platform tool for buildings UIs with Dart, a robust programming language. As cross-platform, we need code interoperability with the native device SDKs like Kotlin in Android, Swift in iOS, C on Desktop and JavaScript on the Web.
Before now, the only way to achieve this were through MethodChannels, they work but affect performance and are asynchronous. You have to wait for Flutter-to-native serialization-deserialization for every native platform function call.
In Dart, we now have the Foreign Function Interface (FFI) paradigm, that lets Dart to call functions in the native side directly and synchronously into the platform. No wrapper overhead per call. No long "awaits". No missing "PlatformChannel Implementations". Just direct native code calls on any isolate. We are talking of nanoseconds of response previous longer times. FFI makes Flutter faster. Many Teams now use it. pub.dev packages are migrating. The Dart & Flutter teams are constantly improving it.
In this session, we will work through profiling a Flutter app with MethodChannels and the same with FFI and see the direct benefit of using FFI in place of MethodChannels. We will also explore the intricacies of it, when to use FFI, and how to properly make the best out of them.
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top