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.
- See PositionReference.
- Inheritance
-
- Object
- TraitAssert
- RelativeTraitAssert
- RelativePositionAssert
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.
constfactory
- 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.
constfactory
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
- right → double?
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited