sumOrZero method

num sumOrZero()
  • return list summation
  • return 0 if isEmpty

Implementation

num sumOrZero() => sumOrNull() ?? 0;