ReportResult.fromJson constructor

ReportResult.fromJson(
  1. Map json_
)

Implementation

ReportResult.fromJson(core.Map json_)
    : this(
        averages: json_.containsKey('averages')
            ? Row.fromJson(
                json_['averages'] as core.Map<core.String, core.dynamic>)
            : null,
        endDate: json_.containsKey('endDate')
            ? Date.fromJson(
                json_['endDate'] as core.Map<core.String, core.dynamic>)
            : null,
        headers: json_.containsKey('headers')
            ? (json_['headers'] as core.List)
                .map((value) => Header.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        rows: json_.containsKey('rows')
            ? (json_['rows'] as core.List)
                .map((value) => Row.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        startDate: json_.containsKey('startDate')
            ? Date.fromJson(
                json_['startDate'] as core.Map<core.String, core.dynamic>)
            : null,
        totalMatchedRows: json_.containsKey('totalMatchedRows')
            ? json_['totalMatchedRows'] as core.String
            : null,
        totals: json_.containsKey('totals')
            ? Row.fromJson(
                json_['totals'] as core.Map<core.String, core.dynamic>)
            : null,
        warnings: json_.containsKey('warnings')
            ? (json_['warnings'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );