or method

  1. @useResult
T or(
  1. T alt
)

Returns the value if it's not a null, otherwise returns the alternative alt.

Implementation

@useResult
T or(T alt) => this != null ? this as T : alt;