toJson method
The --json representation.
Implementation
Map<String, Object?> toJson() => {
'device': app.device,
'uri': app.uri.toString(),
'ok': isSuccess,
if (error != null) 'error': error,
if (isSuccess || result != null) 'result': result,
};