RNumList extension

list readableX

on

Methods

average() num
  • return list average ! throws StateError if isEmpty
  • averageOr(num value) num
  • return list average
  • return value if isEmpty
  • averageOrNull() num?
  • return the average of the list
  • return null if isEmpty
  • averageOrZero() num
  • return the average of the list
  • return 0 if isEmpty
  • countZeros() int
    how many elements == zero
    max() num
  • return the element with the max value ! throws StateError if isEmpty
  • maxOr(num value) num
  • return the element with the max value
  • return value if isEmpty
  • maxOrNull() num?
  • return the maximum value in the list
  • return null if isEmpty
  • maxOrZero() num
  • return the element with the max value
  • return 0 if isEmpty
  • min() num
  • return the element with the minimum value
  • return the element with the max value ! throws StateError if isEmpty
  • minOr(num value) num
  • return the element with the minimum value
  • return value if isEmpty
  • minOrNull() num?
  • return the minimum value in the list
  • return null if isEmpty
  • minOrZero() num
  • return the element with the minimum value
  • return value if isEmpty
  • sum() num
  • return list summation ! throws StateError if isEmpty
  • sumOr(num value) num
  • return list summation
  • return value if list is empty
  • sumOrNull() num?
  • return list summation
  • return null if list is empty
  • sumOrZero() num
  • return list summation
  • return 0 if isEmpty