Aus öffentlichen Paketdaten erstellte Orientierung.
flutter_jscore ist ein Flutter-Plugin, das Dart ermöglicht, JavaScript-Code mit dem JavaScriptCore-Engine auszuwerten. Es ermöglicht eine nahtlose Integration zwischen Dart und JavaScript, sodass JavaScript-Programme direkt innerhalb von Flutter-Anwendungen auf Android, iOS, macOS, Windows und Linux ausgeführt werden können. Dies ist besonders nützlich zum Ausführen dynamischer Skripte, zur Nutzung vorhandener JavaScript-Bibliotheken oder zur Durchführung clientseitiger Berechnungen in JavaScript. Das Plugin bietet eine leichte Brücke zwischen den beiden Umgebungen mit minimalem Overhead.
Anwendungsfälle
JavaScript-Code in Flutter-Apps ausführen
JavaScript-Bibliotheken integrieren
Dynamische Skriptauswertung
Plattformübergreifendes Skripting
Client-seitige Berechnung mit JS
Hauptmerkmale
JavaScriptCore-Engine-Integration
Plattformübergreifende Unterstützung
Dart-JavaScript-Interoperabilität
Einfaches API für Skriptauswertung
Unterstützt mehrere Plattformen
Geeignet für
Entwickler, die JS-Ausführung in Flutter benötigen
Apps, die dynamische Skripte erfordern
Projekte, die bestehende JS-Bibliotheken verwenden
Hybrid-App-Entwicklung
leistungskritische JS-Aufgaben
Hinweise
Beschränkt auf JavaScriptCore (nicht vollständige Browser-Umgebung)
Keine DOM-Manipulation verfügbar
Sicherheitsrisiken bei nicht vertrauenswürdigen Skripten
Für einige Funktionen ist eine plattformspezifische Einrichtung erforderlich
Speichermanagementüberlegungen bei lang laufenden Skripts
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
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.