Interaction class

Describes a widget that we will use to driver the app with

Annotations
  • @freezed

Constructors

Interaction({String? id, required String viewName, required String originalViewName, @Default('') String name, required WidgetType widgetType, @Deprecated('Prefer using the new responsive position functionality') @Default(const WidgetPosition(x: 0, y: 0, capturedDeviceHeight: 0, capturedDeviceWidth: 0)) WidgetPosition position, @Default([]) List<WidgetPosition> widgetPositions, @Default(true) bool visibility, @Default([]) List<String> targetIds, Set<ScrollableDescription>? externalities})
factory
Interaction.fromJson(Map<String, dynamic> json)
factory
Interaction.view({required String viewName, required String originalViewName})
factory

Properties

automationKey String
no setter
copyWith → $InteractionCopyWith<Interaction>
no setterinherited
externalities Set<ScrollableDescription>?
Left-top offset for external widgets that affects this widget (normally ListViews)
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String?
The Id from the firebase backend
no setterinherited
name String
The name we want to use when referring to the widget in the scripts
no setterinherited
originalViewName String
The orignal name of the view this widget was captured on before the prettify
no setterinherited
position WidgetPosition
The position we defined for he widget
no setterinherited
renderPosition WidgetPosition
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetIds List<String>
Target widgets ids that will be affected when this widget activated
no setterinherited
viewName String
The name of the view this widget was captured on
no setterinherited
visibility bool
Whether the key will be visible to the driver or not
no setterinherited
widgetPositions List<WidgetPosition>
The positions this interaction point can take up depending on the screen size.
no setterinherited
widgetType → WidgetType
The type of the widget that's being added
no setterinherited

Methods

addNewScreenDetailsAndPosition({required double x, required double y, required double width, required double height, required Orientation orientation}) Interaction
applyScroll({required ScrollableDescription scrollableDescription}) Interaction
hasDeviceDetailsForScreenSize({required double width, required double height, required Orientation orientation}) bool
migrate() Interaction
Performs a migration using the capturedDeviceWidth and capturedDeviceHeight and returns a new WidgetPosition to be used in the place of the original.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setActivePosition({required Size size, required Orientation orientation}) Interaction
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
override
updatePosition({required double x, required double y, required double currentWidth, required double currentHeight, required Orientation orientation}) Interaction

Operators

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