strictEquals method

bool strictEquals(
  1. Object other
)

Determines if an object is equals than this EasyText instance

Useful for when you need to know if an EasyText and another are fully different

Example:

// like the key in a HashMap with requires strict equality
final strictMap = HashMap<EasyText, String>(
  equals: (a, b) => a.strictEquals(b),
  hashCode: (obj) => obj.strictHashCode,
);

Implementation

bool strictEquals(Object other) {
  if (identical(this, other)) return true;
  if (other is! EasyText) return false;
  return text == other.text && styles == other.styles && id == other.id;
}