areEqual static method

bool areEqual(
  1. dynamic value1,
  2. dynamic value2
)

Checks if two values are equal. The operation can be performed over values of any type.

  • value1 the first value to compare
  • value2 the second value to compare Returns true if values are equal and false otherwise

Implementation

static bool areEqual(dynamic value1, dynamic value2) {
  if (value1 == null && value2 == null) return true;
  if (value1 == null || value2 == null) return false;
  // TODO: must check this code
  return value1 == value2;
}