registerInterfaceProxy static method

void registerInterfaceProxy(
  1. String bridgedTypeName,
  2. InterfaceProxyFactory factory
)

Register a proxy factory for a bridged interface or abstract class.

The bridgedTypeName is the name of the bridged class/interface. The factory creates a native proxy that delegates to the InterpreterVisitor.

Idempotent: Repeated calls with the same bridgedTypeName simply overwrite the previously registered factory — calling this twice (e.g. from a generated registerProxyFactories() that fires on every FlutterD4rt instance) is safe and well-defined.

Implementation

static void registerInterfaceProxy(
  String bridgedTypeName,
  InterfaceProxyFactory factory,
) {
  _interfaceProxies[bridgedTypeName] = factory;
}