SolarPanel.fromJson constructor

SolarPanel.fromJson(
  1. Map json_
)

Implementation

SolarPanel.fromJson(core.Map json_)
    : this(
        center: json_.containsKey('center')
            ? LatLng.fromJson(
                json_['center'] as core.Map<core.String, core.dynamic>)
            : null,
        orientation: json_.containsKey('orientation')
            ? json_['orientation'] as core.String
            : null,
        segmentIndex: json_.containsKey('segmentIndex')
            ? json_['segmentIndex'] as core.int
            : null,
        yearlyEnergyDcKwh: json_.containsKey('yearlyEnergyDcKwh')
            ? (json_['yearlyEnergyDcKwh'] as core.num).toDouble()
            : null,
      );