fill method

T fill(
  1. Map<String, dynamic> attributes
)

Implementation

T fill(Map<String, dynamic> attributes) {
  var model = InstanceReflection(this);
  model.properties
      .where((property) => attributes.containsKey(property.name))
      .forEach((property) => model.setProperty(
          property.name, _cast(property, attributes[property.name])));
  return this as T;
}