hetu_script 0.3.7+2 copy "hetu_script: ^0.3.7+2" to clipboard
hetu_script: ^0.3.7+2 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': () => {'greetings': 'greetings from Dart!'},
  });
  var hetuValue = hetu.eval(r'''
      external fun hello
      var dartValue = hello()
      dartValue['reply'] = 'Hi, this is Hetu.'
      dartValue // the script will return the value of it's last expression
      ''');

  print('hetu value: $hetuValue');
}
43
likes
0
pub points
67%
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