FinancialDetails.fromJson constructor

FinancialDetails.fromJson(
  1. Map json_
)

Implementation

FinancialDetails.fromJson(core.Map json_)
    : this(
        costOfElectricityWithoutSolar:
            json_.containsKey('costOfElectricityWithoutSolar')
                ? Money.fromJson(json_['costOfElectricityWithoutSolar']
                    as core.Map<core.String, core.dynamic>)
                : null,
        federalIncentive: json_.containsKey('federalIncentive')
            ? Money.fromJson(json_['federalIncentive']
                as core.Map<core.String, core.dynamic>)
            : null,
        initialAcKwhPerYear: json_.containsKey('initialAcKwhPerYear')
            ? (json_['initialAcKwhPerYear'] as core.num).toDouble()
            : null,
        lifetimeSrecTotal: json_.containsKey('lifetimeSrecTotal')
            ? Money.fromJson(json_['lifetimeSrecTotal']
                as core.Map<core.String, core.dynamic>)
            : null,
        netMeteringAllowed: json_.containsKey('netMeteringAllowed')
            ? json_['netMeteringAllowed'] as core.bool
            : null,
        percentageExportedToGrid:
            json_.containsKey('percentageExportedToGrid')
                ? (json_['percentageExportedToGrid'] as core.num).toDouble()
                : null,
        remainingLifetimeUtilityBill:
            json_.containsKey('remainingLifetimeUtilityBill')
                ? Money.fromJson(json_['remainingLifetimeUtilityBill']
                    as core.Map<core.String, core.dynamic>)
                : null,
        solarPercentage: json_.containsKey('solarPercentage')
            ? (json_['solarPercentage'] as core.num).toDouble()
            : null,
        stateIncentive: json_.containsKey('stateIncentive')
            ? Money.fromJson(json_['stateIncentive']
                as core.Map<core.String, core.dynamic>)
            : null,
        utilityIncentive: json_.containsKey('utilityIncentive')
            ? Money.fromJson(json_['utilityIncentive']
                as core.Map<core.String, core.dynamic>)
            : null,
      );