toMap method

Map<String, Object?> toMap()

Serializes reachability diagnostics to a map using stable field names.

Implementation

Map<String, Object?> toMap() {
  return <String, Object?>{
    'checked': checked,
    'url': url,
    'method': method,
    'isReachable': isReachable,
    'statusCode': statusCode,
    'contentType': contentType,
    'contentLength': contentLength,
    'responseTimeMs': responseTimeMs,
    'errorType': errorType,
    'errorMessage': errorMessage,
  };
}