getBestConstructorFor method
Returns the best ConstructorReflection for requiredParameters
, optionalParameters
,
nullableParameters
and presentParameters
.
Implementation
ConstructorReflection<O>? getBestConstructorFor(
{Iterable<String> requiredParameters = const <String>[],
Iterable<String> optionalParameters = const <String>[],
Iterable<String> nullableParameters = const <String>[],
Iterable<String> presentParameters = const <String>[],
bool jsonName = false}) {
var constructors = getBestConstructorsFor(
requiredParameters: requiredParameters,
optionalParameters: optionalParameters,
nullableParameters: nullableParameters,
presentParameters: presentParameters,
jsonName: jsonName);
return constructors.firstOrNull;
}