toJson method Null safety

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (cancellationDetails != null)
        'cancellationDetails': cancellationDetails!,
      if (createTime != null) 'createTime': createTime!,
      if (cycleEndTime != null) 'cycleEndTime': cycleEndTime!,
      if (endUserEntitled != null) 'endUserEntitled': endUserEntitled!,
      if (freeTrialEndTime != null) 'freeTrialEndTime': freeTrialEndTime!,
      if (name != null) 'name': name!,
      if (partnerUserToken != null) 'partnerUserToken': partnerUserToken!,
      if (processingState != null) 'processingState': processingState!,
      if (products != null) 'products': products!,
      if (promotions != null) 'promotions': promotions!,
      if (redirectUri != null) 'redirectUri': redirectUri!,
      if (serviceLocation != null) 'serviceLocation': serviceLocation!,
      if (state != null) 'state': state!,
      if (updateTime != null) 'updateTime': updateTime!,
      if (upgradeDowngradeDetails != null)
        'upgradeDowngradeDetails': upgradeDowngradeDetails!,
    };