ScreenInfo class

Clase inmutable que almacena las dimensiones de la pantalla y tipo de dispositivo. La inmutabilidad es clave para la eficiencia del InheritedWidget y el null safety.

Annotations

Constructors

ScreenInfo({required double width, required double height, required double textScale, required DeviceType deviceType})
const

Properties

deviceType DeviceType
final
hashCode int
The hash code for this object.
no setteroverride
height double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textScale double
final
width double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
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).
override