sumOr method

num sumOr(
  1. num value
)
  • return list summation
  • return value if list is empty

Implementation

num sumOr(num value) => sumOrNull() ?? value;