Aggregate.fromJson constructor Null safety

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

Implementation

Aggregate.fromJson(Map<String, dynamic> json) {
  result = json['result'] ?? '';
  volumes = <Volume>[];
  if (json['volumes'] != null) {
    json['volumes'].forEach((s, e) {
      volumes.add(Volume.fromJson(e));
    });
  } else {
    print('null json xdxdxd');
  }
}