setProperty method Null safety

void setProperty(
  1. dynamic obj,
  2. String name,
  3. dynamic value
)

Sets value of object property specified by its name.

If the property does not exist or introspection fails this method doesn't do anything and doesn't any throw errors.

  • obj an object to write property to.
  • name a name of the property to set.
  • value a new value for the property to set.