StacSize class

A Stac representation of a 2D size with width and height.

This class represents dimensions in 2D space, commonly used for specifying the size of widgets, images, or other UI elements.

{@tool snippet} Dart Example:

const StacSize(100.0, 200.0)

{@end-tool}

{@tool snippet} JSON Example:

{
  "width": 100.0,
  "height": 200.0
}

{@end-tool}

Implemented types
Available extensions
Annotations
  • @JsonSerializable.new()

Constructors

StacSize(double width, double height)
Creates a size with the specified width and height.
const
StacSize.fromJson(Map<String, dynamic> json)
Creates a StacSize from a JSON map.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
height → double
The height in logical pixels.
final
parse → Size

Available on StacSize, provided by the StacSizeParser extension

no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double
The width in logical pixels.
final

Methods

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

Operators

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