Request.fromJson constructor

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

Implementation

Request.fromJson(Map<String, dynamic> json)
    : loadingMethod = json['loading-method'],
      url = json['url'],
      kind = EnumToString.fromString(RequestType.values,
          json['kind'].toUpperCase().replaceAll("-", "_"))!,
      priority = EnumToString.fromString(RequestPriority.values,
          json['priority'].toUpperCase().replaceAll("-", "_"))!;