DataEntry.fromJson constructor

DataEntry.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DataEntry.fromJson(Map<String, dynamic> json) {
  return DataEntry(
    requestURL: json['requestURL'] as String,
    requestMethod: json['requestMethod'] as String,
    requestHeaders: (json['requestHeaders'] as List)
        .map((e) => Header.fromJson(e as Map<String, dynamic>))
        .toList(),
    responseTime: json['responseTime'] as num,
    responseStatus: json['responseStatus'] as int,
    responseStatusText: json['responseStatusText'] as String,
    responseType: CachedResponseType.fromJson(json['responseType'] as String),
    responseHeaders: (json['responseHeaders'] as List)
        .map((e) => Header.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}