hetu_script 0.4.2+1 copy "hetu_script: ^0.4.2+1" to clipboard
hetu_script: ^0.4.2+1 copied to clipboard

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

example/example.dart

import 'package:hetu_script/hetu_script.dart';

void main() {
  final 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');
}
49
likes
130
points
21
downloads

Publisher

verified publisherhetu.dev

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

characters, fast_noise, intl, meta, path, pub_semver, quiver, recase

More

Packages that depend on hetu_script