registerFunction method

void registerFunction(
  1. String key,
  2. JsonWidgetFunction fun
)

Registers the key as function name with the registry to be used in function bindings. Functions registered by the application take precidence over built in registered functions. This allows the application the ability to provide custom functions even for built in key's.

Implementation

void registerFunction(
  String key,
  JsonWidgetFunction fun,
) {
  assert(key.isNotEmpty == true);

  _functions[key] = fun;
}