HlsSegmentReachability.fromMap constructor

HlsSegmentReachability.fromMap(
  1. Map<Object?, Object?> map
)

Creates reachability diagnostics from a map using stable field names.

Implementation

factory HlsSegmentReachability.fromMap(Map<Object?, Object?> map) {
  return HlsSegmentReachability(
    checked: _readBool(map, 'checked'),
    url: _readOptionalString(map, 'url'),
    method: _readOptionalString(map, 'method'),
    isReachable: _readBool(map, 'isReachable'),
    statusCode: _readOptionalInt(map, 'statusCode'),
    contentType: _readOptionalString(map, 'contentType'),
    contentLength: _readOptionalInt(map, 'contentLength'),
    responseTimeMs: _readOptionalInt(map, 'responseTimeMs'),
    errorType: _readOptionalString(map, 'errorType'),
    errorMessage: _readOptionalString(map, 'errorMessage'),
  );
}