operator == method

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

Sobreescritura crucial: Permite al InheritedWidget saber si ALGO cambió. La igualdad requiere que TODAS las propiedades sean idénticas. Si un campo es diferente, devuelve false, lo que dispara la notificación (info != oldInfo -> true).

Implementation

@override
bool operator ==(Object other) =>
    identical(this, other) ||
    other is ScreenInfo &&
        runtimeType == other.runtimeType &&
        width == other.width &&
        height == other.height &&
        textScale == other.textScale &&
        deviceType == other.deviceType;