setupBridge method

  1. @override
bool setupBridge(
  1. String channelName,
  2. void fn(
    1. dynamic args
    )
)
override

Implementation

@override
bool setupBridge(String channelName, void Function(dynamic args) fn) {
  final channelFunctionCallbacks =
      JavascriptRuntime.channelFunctionsRegistered[getEngineInstanceId()]!;

  if (channelFunctionCallbacks.keys.contains(channelName)) return false;

  channelFunctionCallbacks[channelName] = fn;

  return true;
}