equals method Null safety

bool equals(
  1. dynamic other
)

Checks if other is equal to the value of this EmpireProperty

Usage

final EmpireProperty<int> age = createProperty(10);

age.equals(10); //returns true


final EmpireProperty<int> ageTwo = createProperty(10);

age.equals(ageTwo); //returns true

Implementation

bool equals(dynamic other) {
  if (other is EmpireProperty) {
    return other.value == value;
  } else {
    return other == value;
  }
}