coerceMapOrNull<K, V> static method

Map<K, V>? coerceMapOrNull<K, V>(
  1. Object? arg,
  2. String paramName, [
  3. InterpreterVisitor? visitor
])

Coerce a Map from D4rt, returning null if arg is null.

If visitor is provided and the value type V is a function type, InterpretedFunction values will be wrapped in proper callbacks.

Implementation

static Map<K, V>? coerceMapOrNull<K, V>(
  Object? arg,
  String paramName, [
  InterpreterVisitor? visitor,
]) {
  if (arg == null) return null;
  return coerceMap<K, V>(arg, paramName, visitor);
}