isEqualTo method

bool isEqualTo(
  1. T other
)

Checks if this value is equal to other.

A convenient boolean method that checks for equality using the Comparable interface.

Example:

if (5.isEqualTo(5)) {
  print('Values are equal');
}

Implementation

bool isEqualTo(T other) => compareWith(other) == .equal;