allocationAccordingTo method
Returns allocation of this money according to ratios
.
A value of the parameter ratios
must be a non-empty list, with
not negative values and sum of these values must be greater than zero.
Implementation
List<Money> allocationAccordingTo(List<int> ratios) =>
amount.allocationAccordingTo(ratios).map(_withAmount).toList();