ResourceEventData.fromJson constructor

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

Implementation

ResourceEventData.fromJson(Map<String, dynamic> json)
    : begin = json['begin'],
      end = json['end'],
      dataSource = EnumToString.fromString(DataSourceType.values,
          json['data-source'].toUpperCase().replaceAll("-", "_"))!,
      request = Request.fromJson(json['request']),
      response = json['response'] != null
          ? Response.fromJson(json['response'])
          : null,
      cancelled = json['cancelled'];