Cost constructor

Cost({
  1. Money? value,
  2. DateTime? date,
  3. String? label,
})

Absolute cost: {{amount, date, label}} {{10.00 BRL, 2020-11-19, "lot-A"}} Per unit cost: {amount, date, label} {10.00 BRL, 2020-11-19, "lot-A"}

For this factory, value must be per-unit.

Implementation

factory Cost({
   Money? value,
   DateTime? date,
   String? label,
}) {
  return _Cost(
    value: value,
    date: date,
    label: label,
  );
}