createInstanceWithConstructorByName method
O?
createInstanceWithConstructorByName(
- String constructorName,
- Map<
String, dynamic> map, { - FieldNameResolver? fieldNameResolver,
- FieldValueResolver? fieldValueResolver,
Creates an instance with the constructor with constructorName
using map
entries as parameters.
Implementation
O? createInstanceWithConstructorByName(
String constructorName, Map<String, dynamic> map,
{FieldNameResolver? fieldNameResolver,
FieldValueResolver? fieldValueResolver}) {
var constructor = this.constructor(constructorName);
if (constructor == null) return null;
return createInstanceWithConstructor(constructor, map,
fieldNameResolver: fieldNameResolver,
fieldValueResolver: fieldValueResolver);
}