Skip to content

mabDc/flutter_jscore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_jscore

License Awesome Flutter Pub

JavaScriptCore for Flutter. The plugin provides the ability to evaluate JavaScript programs from within dart.

Demo

Screen recording Apk
Code Download

Getting Started

Add dependency

// pub
dependencies:
  flutter_jscore: ^last_version

// import
dependencies:
  flutter_jscore:
    path: Your local path

// git
dependencies:
  flutter_jscore:
    git:
      url: git://github.com/xuelongqy/flutter_jscore.git

Super simple to use

import 'package:flutter_jscore/flutter_jscore.dart';

void runJS() {
    JSContext jsContext = JSContext.createInGroup();
    // Replace '1 + 1' with your JavaScript code
    JSValue jsValue = jsContext.evaluate('1 + 1');
    print(jsValue.string);
    jsContext.release();
}

JavaScriptCore

Evaluate JavaScript programs from within an app, and support JavaScript scripting of your app.

Documentation

dart:ffi

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.

dart:ffi

Supported platforms

  • iOS (7.0+)
  • macOS (10.5+)
  • Android (arm32, arm64, x86, x86_64)
  • Windows (coming soon)
  • Linux (coming soon)

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.

JavaScriptCore

flutter_jscore

Donation

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 Donate to this project using Paypal, 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

Donation list

QQ Group - 554981921

Into the group of instructions

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.

About

JavaScriptCore for Flutter use dart:ffi.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 81.2%
  • C++ 8.3%
  • CMake 3.6%
  • Ruby 3.0%
  • C 1.1%
  • Kotlin 1.1%
  • Other 1.7%