toJson method
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
While not required, it is suggested to call removeNull
before returning.
Implementation
@override
Map<String, dynamic> toJson([includeImageData = false]) => {
'deviceInfo': deviceInfo?.toJson(),
'endTime': endTime?.millisecondsSinceEpoch,
'errorSteps': errorSteps,
'id': id,
'images': TestImage.toJsonList(images, includeImageData),
'logs': logs,
'name': name,
'passedSteps': passedSteps,
'runtimeException': runtimeException,
'startTime': startTime?.millisecondsSinceEpoch,
'steps': JsonClass.toJsonList(_steps.values.toList()),
'success': success,
'suiteName': suiteName,
'version': version,
};