extractBridgedArgOrNull<T> static method

T? extractBridgedArgOrNull<T>(
  1. Object? arg,
  2. String paramName, [
  3. InterpreterVisitor? visitor
])

Extract a typed value from a BridgedInstance or native object, returning null if the argument is null.

Handles both wrapped (BridgedInstance) and unwrapped (native) objects. Throws ArgumentError if the type doesn't match (and is non-null).

Implementation

static T? extractBridgedArgOrNull<T>(
  Object? arg,
  String paramName, [
  InterpreterVisitor? visitor,
]) {
  if (arg == null) return null;
  return extractBridgedArg<T>(arg, paramName, visitor);
}