Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hot reloading native code changes in Flutter (Plugin Development)

I'm writing a plugin for Flutter on Android that makes use of native code. To my understanding the only way to see the changes in effect is to completely restart the app. Is there another way to do this? Something like Flutters Hot Restart? It takes about a minute to start the app, every time.

like image 645
F.Fidler Avatar asked Nov 02 '25 00:11

F.Fidler


1 Answers

From the hot reload page in the docs:

Hot reload works by injecting updated source code files into the running Dart Virtual Machine (VM)

Hot reload/restart leverages the dart VM to hot swap code. In other words, there's no hot reload/restart for native code since it doesn't run on the dart VM.

Making changes to native code is akin to developing on the native platform directly. If the platform is slow, there's no magic flutter can do to speed it up.

like image 144
Edman Avatar answered Nov 03 '25 13:11

Edman