RelativePositionAssert class

Describes the relative position of a widget targeted by WidgetTrait.

Contrary to PositionAssert the positional information in here is relative to a specific subject defined with refersTo. Depending on the value of the field, the positional fields left, top, right and bottom are interpreted differently. Corresponding constructors are available for the different possibilities.

Inheritance

Constructors

RelativePositionAssert.globalBounds({double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which refers to the distance to the bounds of the global scope.
const
RelativePositionAssert.parent({required String traitId, double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which refers to the location within the specified parent trait.
const
RelativePositionAssert.parentBounds({required String traitId, double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which refers to the distance to the bounds of the parent trait.
const
RelativePositionAssert.relativeTo({required String traitId, double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which describes a position relative to another element.
const
factory
RelativePositionAssert.target({required String traitId, double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which refers to the specified target trait traitId.
const
RelativePositionAssert.within({required String traitId, double? left, double? top, double? right, double? bottom})
Creates an instance of RelativePositionAssert which describes a position within another element.
const
factory

Properties

bottom double?
Offset to the bottom border of the scope.
final
hashCode int
The hash code for this object.
no setterinherited
left double?
Offset to the left border of the scope.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
refersTo PositionReference
Determines the reference of the position infos.
final
Offset to the right border of the scope.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
top double?
Offset to the top border of the scope.
final
traitId String
The target trait ID.
finalinherited

Methods

getLTRB() List<double?>
Returns the values for left, top, right and bottom in a list.
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
The equality operator.
inherited