Product constructor Null safety

Product(
  1. {required String ref,
  2. String? name,
  3. String? group,
  4. Params? parameters}
)

Constructor sets the ref, name?, group? and params? properties

Implementation

Product({required String ref, String? name, String? group, Params? parameters}) {
  setRef(ref);
  if (name != null) setName(name);
  if (group != null) setGroup(group);
  if (parameters != null) setParams(parameters);
}