operator == method Null safety

  1. @override
bool operator ==(
  1. Object o
)
override

An equals (==) operator for comparing two data points This makes it possible to remove duplicate data points.

Implementation

@override
bool operator ==(Object o) {
  return o is HealthDataPoint &&
      this.value == o.value &&
      this.unit == o.unit &&
      this.dateFrom == o.dateFrom &&
      this.dateTo == o.dateTo &&
      this.type == o.type &&
      this.platform == o.platform &&
      this.deviceId == o.deviceId &&
      this.sourceId == o.sourceId &&
      this.sourceName == o.sourceName;
}