CubeInfo.fromJson constructor

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

Implementation

factory CubeInfo.fromJson(Map<String, dynamic> json) {
  return CubeInfo(
    json['name'],
    json['title'],
    List<CubeAxis>.from(json['axes'].map((e) => CubeAxis.fromJson(e))),
    List<CubeView>.from(json['views'].map((e) => CubeView.fromJson(e))),
    json['currencyCode'],
    json.containsKey('yAxis') ? YAxis(json['yAxis']['title']) : null,
    json.containsKey('indices')
        ? List<CubeIndex>.from(
            json['indices'].map((e) => CubeIndex.fromJson(e)))
        : null,
  );
}