Series.fromJson constructor

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

Implementation

Series.fromJson(Map<String, dynamic> json) {
  if (json['totalEsg'] != null) {
    totalEsg = <EsgSeries>[];
    json['totalEsg'].forEach((v) {
      totalEsg!.add(EsgSeries.fromJson(v));
    });
  }
  if (json['socialScore'] != null) {
    socialScore = <EsgSeries>[];
    json['socialScore'].forEach((v) {
      socialScore!.add(EsgSeries.fromJson(v));
    });
  }
  if (json['governanceScore'] != null) {
    governanceScore = <EsgSeries>[];
    json['governanceScore'].forEach((v) {
      governanceScore!.add(EsgSeries.fromJson(v));
    });
  }
  if (json['environmentScore'] != null) {
    environmentScore = <EsgSeries>[];
    json['environmentScore'].forEach((v) {
      environmentScore!.add(EsgSeries.fromJson(v));
    });
  }
}