hetu_script 0.3.5+4 copy "hetu_script: ^0.3.5+4" to clipboard
hetu_script: ^0.3.5+4 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() {
  var hetu = Hetu();
  hetu.init(externalFunctions: {
    'hello': () => {'greeting': 'hello'},
  });
  hetu.eval(r'''
      external fun hello
      fun main {
        var dartValue = hello()
        print('dart value:', dartValue)
        dartValue['foo'] = 'bar'
        return dartValue
      }''');

  var hetuValue = hetu.invoke('main');

  print('hetu value: $hetuValue');
}
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

meta, path, pub_semver, quiver, recase

More

Packages that depend on hetu_script