copyWith method
Copies the current test step with the values provided. The values from the original object will only be overwritten by any values from non-null passed in objects.
To clear the image
, set an image
with a length of zero and that will
result in the copy excluding the image.
Implementation
TestStep copyWith({
String? id,
Uint8List? image,
Map<String, dynamic>? values,
}) =>
TestStep(
id: id ?? this.id,
image: image?.isEmpty == true ? null : image ?? this.image,
values: values ?? this.values,
);