registerFunctionTypedef method
Registers a function typedef so it can be resolved as a type.
Function typedefs like typedef VoidCallback = void Function() are not
classes, but D4rt scripts may reference them as type arguments
(e.g., ObserverList<VoidCallback>()). This registers the name
as a BridgedClass with nativeType: Function so type resolution
succeeds.
name The typedef name (e.g., 'VoidCallback').
library The library path where this typedef is exported from.
Implementation
void registerFunctionTypedef(String name, String library) {
_functionTypedefs.add((name: name, library: library));
}