SolarPanelConfig.fromJson constructor

SolarPanelConfig.fromJson(
  1. Map json_
)

Implementation

SolarPanelConfig.fromJson(core.Map json_)
    : this(
        panelsCount: json_.containsKey('panelsCount')
            ? json_['panelsCount'] as core.int
            : null,
        roofSegmentSummaries: json_.containsKey('roofSegmentSummaries')
            ? (json_['roofSegmentSummaries'] as core.List)
                .map((value) => RoofSegmentSummary.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        yearlyEnergyDcKwh: json_.containsKey('yearlyEnergyDcKwh')
            ? (json_['yearlyEnergyDcKwh'] as core.num).toDouble()
            : null,
      );