Overview
flutter_qjs is a Flutter plugin that integrates the QuickJS JavaScript engine, enabling Dart applications to execute JavaScript code natively. It supports all major platforms except web, making it ideal for scenarios requiring lightweight, embedded scripting. The plugin provides a straightforward API to evaluate JS expressions, call functions, and exchange data between Dart and JavaScript. Built on the high-performance QuickJS project, it ensures fast execution with minimal overhead. This makes it suitable for dynamic logic, configuration scripts, or extending app functionality without recompilation.
Use cases
- Running dynamic scripts in apps
- Embedding JavaScript logic
- Extending app behavior at runtime
- Configuring app features via scripts
- Interfacing with legacy JS code
Key features
- Lightweight QuickJS engine
- Cross-platform (except web)
- Dart-JS interoperability
- Simple API for script evaluation
- Fast execution with low memory usage
Suitable for
- Apps needing dynamic scripting
- Developers using JS for logic
- Plugins requiring embedded engines
- Prototyping with scriptable components
- Non-web mobile and desktop apps
Considerations
- Not available on web platform
- Limited to QuickJS-specific JS features
- Requires careful error handling
- May increase app size slightly
- No support for modern ES modules