TaskAnnotation class abstract

Annotation that links a widget to a test task

Available extensions
Annotations
  • @freezed

Constructors

TaskAnnotation({required String id, required String taskId, String? focusAreaId, String? versionRange, @Default.new([]) List<String> semanticLabels, @Default.new(CompletionTrigger.manual) CompletionTrigger completionTrigger, @Default.new(1) int requiredInteractionCount, @Default.new(0) int currentInteractionCount, String? elementType, String? elementKey, @Default.new({}) Map<String, dynamic> metadata, required DateTime createdAt, required DateTime updatedAt})
const
factory
TaskAnnotation.fromJson(Map<String, dynamic> json)
factory

Properties

completionTrigger → CompletionTrigger
How this annotation triggers task completion
no setterinherited
copyWith → $TaskAnnotationCopyWith<TaskAnnotation>
Create a copy of TaskAnnotation with the given fields replaced by the non-null parameter values.
no setterinherited
createdAt → DateTime
When this annotation was created
no setterinherited
currentInteractionCount → int
Current interaction count
no setterinherited
elementKey → String?
Widget key (if available)
no setterinherited
elementType → String?
Widget type (e.g., 'ElevatedButton', 'TextField')
no setterinherited
focusAreaId → String?
Optional focus area ID
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier for this annotation
no setterinherited
metadata → Map<String, dynamic>
Custom metadata for extensibility
no setterinherited
requiredInteractionCount → int
Number of interactions required to trigger completion
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabels → List<String>
Semantic labels for AI discoverability
no setterinherited
taskId → String
Task ID this annotation is linked to
no setterinherited
updatedAt → DateTime
When this annotation was last updated
no setterinherited
versionRange → String?
Version range this annotation is valid for (semver)
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_TaskAnnotation value)) → TResult

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_TaskAnnotation value)?) → TResult?

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_TaskAnnotation value)?, {required TResult orElse()}) → TResult

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String taskId, String? focusAreaId, String? versionRange, List<String> semanticLabels, CompletionTrigger completionTrigger, int requiredInteractionCount, int currentInteractionCount, String? elementType, String? elementKey, Map<String, dynamic> metadata, DateTime createdAt, DateTime updatedAt)?, {required TResult orElse()}) → TResult

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this TaskAnnotation to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, String taskId, String? focusAreaId, String? versionRange, List<String> semanticLabels, CompletionTrigger completionTrigger, int requiredInteractionCount, int currentInteractionCount, String? elementType, String? elementKey, Map<String, dynamic> metadata, DateTime createdAt, DateTime updatedAt)) → TResult

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String taskId, String? focusAreaId, String? versionRange, List<String> semanticLabels, CompletionTrigger completionTrigger, int requiredInteractionCount, int currentInteractionCount, String? elementType, String? elementKey, Map<String, dynamic> metadata, DateTime createdAt, DateTime updatedAt)?) → TResult?

Available on TaskAnnotation, provided by the TaskAnnotationPatterns extension

A variant of when that fallback to returning null

Operators

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