Cost constructor
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,
);
}