toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'config': config.toJson(),
    'artifacts': artifacts
        .map((e) => {
              'type': e is File ? 'file' : 'directory',
              'path': e.path,
            })
        .toList(),
    'duration': duration,
  }..removeWhere((key, value) => value == null);
}