ScreenObject class abstract
The ScreenObject class is the abstract base class for all objects that are rendered on the screen.
A screen object represents a visual element with layout information, visibility state, and a hierarchical relationship to other objects. Concrete subclasses are expected to provide their own rendering data through elements.
Constructors
- ScreenObject()
- Creates a new ScreenObject with a generated unique identifier.
Properties
-
elements
↔ Map<
String, String> -
A map of element-specific properties.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalAlignment ↔ HorizontalAlignment
-
The horizontal alignment of this object within its parent.
getter/setter pair
- id → String
-
The unique identifier of this screen object.
final
- isVisible ↔ bool
-
Whether this object is visible.
getter/setter pair
- layoutMargin ↔ ScreenObjectEdgeInsets
-
The margin applied around this object during layout.
getter/setter pair
- parent ↔ ScreenObjectContainer?
-
The parent container of this object, if any.
getter/setter pair
- root → ScreenObject?
-
Returns the root object of the hierarchy.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldInvalidateLayout → bool
-
Whether this object requires a layout update.
no setter
- size ↔ ScreenObjectSize
-
Returns the frame rectangle of this object.
getter/setter pair
- type → String
-
The logical type of this screen object.
no setter
- verticalAlignment ↔ VerticalAlignment
-
The vertical alignment of this object within its parent.
getter/setter pair
Methods
-
invalidateLayout(
) → void - Invalidates the current layout and propagates the change to parents.
-
layout(
ScreenRenderer renderer) → void -
Performs layout for this object using the given
renderer. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
snapshot(
) → ScreenObjectSnapshot - Creates a snapshot representing the current state of this object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited