PeriodicAllowance constructor

PeriodicAllowance({
  1. BasicAllowance? basic,
  2. Duration? period,
  3. Iterable<Coin>? periodSpendLimit,
  4. Iterable<Coin>? periodCanSpend,
  5. Timestamp? periodReset,
})

Implementation

factory PeriodicAllowance({
  BasicAllowance? basic,
  $4.Duration? period,
  $core.Iterable<$2.Coin>? periodSpendLimit,
  $core.Iterable<$2.Coin>? periodCanSpend,
  $3.Timestamp? periodReset,
}) {
  final _result = create();
  if (basic != null) {
    _result.basic = basic;
  }
  if (period != null) {
    _result.period = period;
  }
  if (periodSpendLimit != null) {
    _result.periodSpendLimit.addAll(periodSpendLimit);
  }
  if (periodCanSpend != null) {
    _result.periodCanSpend.addAll(periodCanSpend);
  }
  if (periodReset != null) {
    _result.periodReset = periodReset;
  }
  return _result;
}