allocationTo method
Returns allocation of this money to N targets
.
A value of the parameter targets
must be greater than zero.
Implementation
List<Money> allocationTo(int targets) {
if (targets < 1) {
throw ArgumentError.value(
targets,
'targets',
'Number of targets must not be less than one, '
'cannot allocate to nothing.');
}
return allocationAccordingTo(List<int>.filled(targets, 1));
}