hasInterfaceProxy static method

bool hasInterfaceProxy(
  1. String bridgedTypeName
)

Returns true when an interface-proxy factory has been registered for the bridged type bridgedTypeName (via registerInterfaceProxy).

Used by the interpreter (super(...) resolution in callable.dart) to skip the missing-bridge-constructor error for abstract widget bases like SingleChildRenderObjectWidget / LeafRenderObjectWidget: when a script subclass calls super(...) and the abstract base has no emitted constructor adapter, the interpreter would normally throw "Bridged superclass 'X' does not have a constructor named ''.". When a proxy is registered for that bridged type, the interpreter knows that tryCreateInterfaceProxyWithVisitor will later wrap the InterpretedInstance into a native widget at every bridge boundary, so the super-constructor call can be a no-op.

Implementation

static bool hasInterfaceProxy(String bridgedTypeName) =>
    _interfaceProxies.containsKey(bridgedTypeName);