toMap method

Map<String, Object?> toMap()

Serializes the result to a map using stable field names.

Implementation

Map<String, Object?> toMap() {
  return <String, Object?>{
    'url': url,
    'finalUrl': finalUrl,
    'riskLevel': riskLevel,
    'severity': severity,
    'canContinue': canContinue,
    'statusCode': statusCode,
    'contentType': contentType,
    'isReachable': isReachable,
    'isManifestReadable': isManifestReadable,
    'isLikelyHls': isLikelyHls,
    'hasVariantStreams': hasVariantStreams,
    'hasMediaSegments': hasMediaSegments,
    'variantUrls': variantUrls,
    'segmentUrls': segmentUrls,
    'reasons': reasons,
    'recommendations': recommendations,
    'userMessage': userMessage,
    'developerMessage': developerMessage,
    'analyzedAtMillis': analyzedAtMillis,
    'redirectCount': redirectCount,
    'elapsedMillis': elapsedMillis,
    'manifestByteLength': manifestByteLength,
    'probeStage': probeStage,
    'errorCode': errorCode,
    'hlsPlaylistType': hlsPlaylistType,
    'hlsPlaylistSummary': hlsPlaylistSummary?.toMap(),
    'firstSegmentReachability': firstSegmentReachability?.toMap(),
    'hlsVariants': hlsVariants
        .map((HlsVariantStream variant) => variant.toMap())
        .toList(growable: false),
    'hlsSegments': hlsSegments
        .map((HlsMediaSegment segment) => segment.toMap())
        .toList(growable: false),
  };
}