callNum abstract method

num callNum(
  1. String function, {
  2. List<Object?> args = const [],
  3. List<String> argTypes = const [],
})

Calls an exported C function that returns a number.

argTypes defaults to all number arguments. Use Emscripten ccall types such as number, string, boolean, or array for other arguments. Example:

final result = module.callNum('add', args: [1, 2]);
final ok = module.callNum(
  'open',
  args: [':memory:'],
  argTypes: ['string'],
);

Implementation

num callNum(String function, {List<Object?> args = const [], List<String> argTypes = const []});