hetu_script 0.1.1+3 copy "hetu_script: ^0.1.1+3" to clipboard
hetu_script: ^0.1.1+3 copied to clipboard

outdated

Hetu is a lightweight script language for embedding in Flutter apps.

example/example.dart

import 'package:hetu_script/hetu_script.dart';

void main() async {
  var hetu = Hetu();
  await hetu.init();
  await hetu.eval(r'''
      fun closure(func) {
        var i = 42
        fun nested () {
          i = i + 1
          print(func(i))
        }
        return nested
      }

      fun main {
        var func = closure( fun (n) { return n * n } )
        func()
        func()
      }
      ''', invokeFunc: 'main');
}
48
likes
0
pub points
63%
popularity

Publisher

verified publisherhetu.dev

Hetu is a lightweight script language for embedding in Flutter apps.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

path, pub_semver, quiver

More

Packages that depend on hetu_script