maxOr method

num maxOr(
  1. num value
)
  • return the element with the max value
  • return value if isEmpty

Implementation

num maxOr(num value) => maxOrNull() ?? value;