toJson method
Implementation
Map<String, Object?> toJson() => {
'action': action.label,
'ok': ok,
'summary': summary,
if (physicalCenter != null) 'physicalCenter': {'x': physicalCenter!.x, 'y': physicalCenter!.y},
if (logicalCenter != null) 'logicalCenter': {'x': logicalCenter!.x, 'y': logicalCenter!.y},
if (devicePixelRatio != null) 'devicePixelRatio': devicePixelRatio,
if (painted != null) 'painted': painted,
if (hittable != null) 'hittable': hittable,
if (warnings.isNotEmpty) 'warnings': warnings,
if (nextSteps.isNotEmpty) 'nextSteps': nextSteps,
if (error != null) 'error': error,
if (errorKind != null) 'errorKind': errorKind!.name,
if (input != null) 'input': input!.toJson(),
...extra,
};