between method

bool between(
  1. T first,
  2. T endInclusive
)

Returns true when between first and endInclusive. The order of the arguments doesn't matter.

Alias for first.rangeTo(endInclusive).contains(this)

Implementation

bool between(T first, T endInclusive) =>
    first.rangeTo(endInclusive).contains(this);