LoadNetworkResourcePageResult.fromJson constructor

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

Implementation

factory LoadNetworkResourcePageResult.fromJson(Map<String, dynamic> json) {
  return LoadNetworkResourcePageResult(
    success: json['success'] as bool? ?? false,
    netError: json.containsKey('netError') ? json['netError'] as num : null,
    netErrorName: json.containsKey('netErrorName')
        ? json['netErrorName'] as String
        : null,
    httpStatusCode: json.containsKey('httpStatusCode')
        ? json['httpStatusCode'] as num
        : null,
    stream: json.containsKey('stream')
        ? io.StreamHandle.fromJson(json['stream'] as String)
        : null,
    headers: json.containsKey('headers')
        ? network.Headers.fromJson(json['headers'] as Map<String, dynamic>)
        : null,
  );
}