getBestConstructorForMap method
ConstructorReflection<O> ?
getBestConstructorForMap(
- Map<
String, Object?> map, { - FieldNameResolver? fieldNameResolver,
- FieldValueResolver? fieldValueResolver,
- bool allowEmptyConstructors = true,
- bool allowOptionalOnlyConstructors = true,
Returns the best constructor to instantiate with map
entries.
Implementation
ConstructorReflection<O>? getBestConstructorForMap(Map<String, Object?> map,
{FieldNameResolver? fieldNameResolver,
FieldValueResolver? fieldValueResolver,
bool allowEmptyConstructors = true,
bool allowOptionalOnlyConstructors = true}) {
var constructors = getBestConstructorsForMap(map,
fieldNameResolver: fieldNameResolver,
fieldValueResolver: fieldValueResolver,
allowEmptyConstructors: allowEmptyConstructors,
allowOptionalOnlyConstructors: allowOptionalOnlyConstructors);
return constructors.firstOrNull;
}