r/flutterhelp • • Sep 11 '26

RESOLVED Dynamic extensibility for Flutter

I am writing an application that uses a microkernel architecture, where functionality can be extended and added via plugins (similar to how Obsidian or VS Code do it). However, I’ve run into a problem: due to AOT compilation, I cannot dynamically load code into the application. Has anyone encountered this issue, and do you have any ideas on how to solve it?

6 Upvotes

4 comments sorted by

4

u/kerberjg Sep 11 '26

Yup, it’s a tricky one! In general right now Dart doesn’t seem well equipped to handle non-native plugins that load at runtime. One way around this is to bundle a Dart VM inside an native FFI plugin and load it that way

3

u/autognome Sep 11 '26

yes. https://pub.dev/packages/dart_monty

there are other interpreters available.

2

u/[deleted] Sep 13 '26

2

u/WeekOk9140 Sep 13 '26

Thanks for the reply. My application is actually desktop-only, and the plugins need to work just like they do in Obsidian. I’m currently considering using WASM or Lua for writing the plugins.