toJson method Null safety

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (accountId != null) 'accountId': accountId!,
      if (aggregatorInfo != null) 'aggregatorInfo': aggregatorInfo!,
      if (averageFiveStarRating != null)
        'averageFiveStarRating': averageFiveStarRating!,
      if (averageWeeklyBudget != null)
        'averageWeeklyBudget': averageWeeklyBudget!,
      if (businessName != null) 'businessName': businessName!,
      if (currencyCode != null) 'currencyCode': currencyCode!,
      if (currentPeriodChargedLeads != null)
        'currentPeriodChargedLeads': currentPeriodChargedLeads!,
      if (currentPeriodConnectedPhoneCalls != null)
        'currentPeriodConnectedPhoneCalls': currentPeriodConnectedPhoneCalls!,
      if (currentPeriodPhoneCalls != null)
        'currentPeriodPhoneCalls': currentPeriodPhoneCalls!,
      if (currentPeriodTotalCost != null)
        'currentPeriodTotalCost': currentPeriodTotalCost!,
      if (impressionsLastTwoDays != null)
        'impressionsLastTwoDays': impressionsLastTwoDays!,
      if (phoneLeadResponsiveness != null)
        'phoneLeadResponsiveness': phoneLeadResponsiveness!,
      if (previousPeriodChargedLeads != null)
        'previousPeriodChargedLeads': previousPeriodChargedLeads!,
      if (previousPeriodConnectedPhoneCalls != null)
        'previousPeriodConnectedPhoneCalls':
            previousPeriodConnectedPhoneCalls!,
      if (previousPeriodPhoneCalls != null)
        'previousPeriodPhoneCalls': previousPeriodPhoneCalls!,
      if (previousPeriodTotalCost != null)
        'previousPeriodTotalCost': previousPeriodTotalCost!,
      if (totalReview != null) 'totalReview': totalReview!,
    };