ScreenObjectSize class

Represents a rectangular area in screen coordinates.

This class is an immutable value object that describes the position and size of a screen object using integer-based coordinates.

Typically used for layout calculation, hit testing, or serialization.

Annotations
  • @freezed

Constructors

ScreenObjectSize({required int width, required int height})
Creates a rectangle defined by its top-left position and size.
const
factory
ScreenObjectSize.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $ScreenObjectSizeCopyWith<ScreenObjectSize>
Create a copy of ScreenObjectSize with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
height int
The height of the rectangle.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
The width of the rectangle.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ScreenObjectSize to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited