getRequiredNamedArgTodoDefault<T> static method
T
getRequiredNamedArgTodoDefault<T>()
Helper for named parameters with non-wrappable defaults.
The original Dart code has a default value that cannot be expressed in the bridge (e.g., class static members, private constants, complex expressions). This forces the caller to provide a value at runtime.
Throws ArgumentError if the value is null.
Implementation
static T getRequiredNamedArgTodoDefault<T>(
Map<String, Object?> named,
String paramName,
String methodName,
String originalDefault,
) {
if (!named.containsKey(paramName) || named[paramName] == null) {
throw ArgumentD4rtException(
'$methodName: Parameter "$paramName" has non-wrappable default ($originalDefault). '
'Value must be specified but was null.',
);
}
return extractBridgedArg<T>(named[paramName], paramName);
}