Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Flutter convert Dart code into Java/Kotlin?

Tags:

flutter

I just want to know if Flutter runs Dart code directly on Android or convert that into Java/Kotlin and actually run that?

like image 572
ukasha sohail Avatar asked Jan 26 '23 15:01

ukasha sohail


1 Answers

Maybe this help you:

How does Flutter run my code on Android?

The engine’s C and C++ code are compiled with Android’s NDK. The Dart code (both the SDK’s and yours) are ahead-of-time (AOT) compiled into a native, ARM and x86 libraries. Those libraries are included in a “runner” Android project, and the whole thing is built into an APK. When launched, the app loads the Flutter library. Any rendering, input or event handling, and so on, is delegated to the compiled Flutter and app code. This is similar to the way many game engines work.

Debug mode builds use a virtual machine (VM) to run Dart code (hence the “debug” banner they show to remind people that they’re slightly slower) in order to enable Stateful Hot Reload.

How does Flutter run my code on iOS?

The engine’s C and C++ code are compiled with LLVM. The Dart code (both the SDK’s and yours) are ahead-of-time (AOT) compiled into a native, ARM library. That library is included in a “runner” iOS project, and the whole thing is built into an .ipa. When launched, the app loads the Flutter library. Any rendering, input or event handling, and so on, are delegated to the compiled Flutter and app code. This is similar to the way many game engines work.

Debug mode builds use a virtual machine (VM) to run Dart code (hence the “debug” banner they show to remind people that they’re slightly slower) in order to enable Stateful Hot Reload.

Read more here: https://flutter.dev/docs/resources/faq#run-android

like image 117
Manuel Panizzo Avatar answered Feb 08 '23 08:02

Manuel Panizzo