ViewportRect class final

Normalized viewport rectangle.

A local type rather than dart:ui's Rect, so the render layer stays free of Flutter's UI library and remains usable from a plain Dart test. Named distinctly on purpose: Rect would collide with Flutter's in every file that imports both.

Constructors

ViewportRect(double x, double y, double width, double height)
Fractions of the target, so every one of these belongs in [0, 1] and the rectangle has to stay inside it.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
height → double
A 0..1 fraction of the target's height.
final
isFullTarget → bool
Whether this viewport is the whole target.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width → double
A 0..1 fraction of the target's width.
final
x → double
Left edge, a 0..1 fraction of the target's width.
final
y → double
Top edge, a 0..1 fraction of the target's height.
final

Methods

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

Operators

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