Package selection guidance compiled from public package information, community data, and project usage.
flutter_jscore is a Flutter plugin that enables Dart to evaluate JavaScript code using the JavaScriptCore engine. It allows seamless integration between Dart and JavaScript, making it possible to run JavaScript programs directly within Flutter applications on Android, iOS, macOS, Windows, and Linux. This is particularly useful for executing dynamic scripts, leveraging existing JavaScript libraries, or performing client-side computations in JavaScript. The plugin provides a lightweight bridge between the two environments with minimal overhead.
Use cases
Running JavaScript code in Flutter apps
Integrating JavaScript libraries
Dynamic script evaluation
Cross-platform scripting
Client-side computation with JS
Key features
JavaScriptCore engine integration
Cross-platform support
Dart-JavaScript interoperability
Simple API for script evaluation
Supports multiple platforms
Suitable for
Developers needing JS execution in Flutter
Apps requiring dynamic scripting
Projects using existing JS libraries
Hybrid app development
Performance-critical JS tasks
Considerations
Limited to JavaScriptCore (not full browser environment)
No DOM manipulation available
Security risks with untrusted scripts
Requires platform-specific setup for some features
Memory management considerations with long-running scripts
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
flutter_jscore
JavaScriptCore for Flutter. The plugin provides the ability to evaluate JavaScript programs from within dart.
Due to the size limitation of pub on package upload, you need to add JavaScriptCore dynamic library to the project by yourself.
You can refer to the example. of course you can refer to webkit to compile it.
Set JscFfi.lib to use the JavaScriptCore dynamic library.
You can get the aar file containing libjsc.so in jsc-android, and add to your project.
Take the libs folder as an example, add it to the build.gradle of the module.
You also need to add libc++_shared.so, because this is a dependency of libjsc.so.
Take the jniLibs folder as an example, add it to the build.gradle of the module.
You can use libjavascriptcoregtk as a dependency, or compile webkitgtk yourself.
The names of dynamic libraries in different Linux distributions may be different. So you need to set JscFfi.lib.
Foreign Function Interface for interoperability with the C programming language. flutter_jscore uses dart:ffi so you don't have to worry about performance loss across programming languages.
If you use it on Linux, you must make sure to have the following dependencies.
libglib-2.0.so.0
libicui18n.so.66
libicuuc.so.66
libdl.so.2
libgio-2.0.so.0
libgobject-2.0.so.0
libpthread.so.0
libstdc++.so.6
libm.so.6
libgcc_s.so.1
libc.so.6
ld-linux-x86-64.so.2
APIs
I don't think there is much to describe, flutter_jscore just makes a simple package. You can refer to the documentation of JavaScriptCore and the documentation on pub.
If you like my project, please in the upper right corner of the project "Star". Your support is my biggest encouragement! ^_^
You can also scan the qr code below or , donation to Author.
If in donation message note name, will be record to the list if you are making open source authors, donation can leave when making project address or personal home page, a link will be added to the list have the effect of promoting each other
The group is not only solve the problem of EasyreFresh, any Flutter related issues can be discussed. Just as its name, craigslist, as long as there is time, group of Lord will help you solve problems together.