toJson method

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (addedSugars != null) 'addedSugars': addedSugars!,
      if (addedSugarsDailyPercentage != null)
        'addedSugarsDailyPercentage': addedSugarsDailyPercentage!,
      if (calcium != null) 'calcium': calcium!,
      if (calciumDailyPercentage != null)
        'calciumDailyPercentage': calciumDailyPercentage!,
      if (cholesterol != null) 'cholesterol': cholesterol!,
      if (cholesterolDailyPercentage != null)
        'cholesterolDailyPercentage': cholesterolDailyPercentage!,
      if (dietaryFiber != null) 'dietaryFiber': dietaryFiber!,
      if (dietaryFiberDailyPercentage != null)
        'dietaryFiberDailyPercentage': dietaryFiberDailyPercentage!,
      if (energy != null) 'energy': energy!,
      if (energyFromFat != null) 'energyFromFat': energyFromFat!,
      if (folateDailyPercentage != null)
        'folateDailyPercentage': folateDailyPercentage!,
      if (folateFolicAcid != null) 'folateFolicAcid': folateFolicAcid!,
      if (folateMcgDfe != null) 'folateMcgDfe': folateMcgDfe!,
      if (iron != null) 'iron': iron!,
      if (ironDailyPercentage != null)
        'ironDailyPercentage': ironDailyPercentage!,
      if (monounsaturatedFat != null)
        'monounsaturatedFat': monounsaturatedFat!,
      if (nutritionFactMeasure != null)
        'nutritionFactMeasure': nutritionFactMeasure!,
      if (polyols != null) 'polyols': polyols!,
      if (polyunsaturatedFat != null)
        'polyunsaturatedFat': polyunsaturatedFat!,
      if (potassium != null) 'potassium': potassium!,
      if (potassiumDailyPercentage != null)
        'potassiumDailyPercentage': potassiumDailyPercentage!,
      if (preparedSizeDescription != null)
        'preparedSizeDescription': preparedSizeDescription!,
      if (protein != null) 'protein': protein!,
      if (proteinDailyPercentage != null)
        'proteinDailyPercentage': proteinDailyPercentage!,
      if (saturatedFat != null) 'saturatedFat': saturatedFat!,
      if (saturatedFatDailyPercentage != null)
        'saturatedFatDailyPercentage': saturatedFatDailyPercentage!,
      if (servingSizeDescription != null)
        'servingSizeDescription': servingSizeDescription!,
      if (servingSizeMeasure != null)
        'servingSizeMeasure': servingSizeMeasure!,
      if (servingsPerContainer != null)
        'servingsPerContainer': servingsPerContainer!,
      if (sodium != null) 'sodium': sodium!,
      if (sodiumDailyPercentage != null)
        'sodiumDailyPercentage': sodiumDailyPercentage!,
      if (starch != null) 'starch': starch!,
      if (totalCarbohydrate != null) 'totalCarbohydrate': totalCarbohydrate!,
      if (totalCarbohydrateDailyPercentage != null)
        'totalCarbohydrateDailyPercentage': totalCarbohydrateDailyPercentage!,
      if (totalFat != null) 'totalFat': totalFat!,
      if (totalFatDailyPercentage != null)
        'totalFatDailyPercentage': totalFatDailyPercentage!,
      if (totalSugars != null) 'totalSugars': totalSugars!,
      if (totalSugarsDailyPercentage != null)
        'totalSugarsDailyPercentage': totalSugarsDailyPercentage!,
      if (transFat != null) 'transFat': transFat!,
      if (transFatDailyPercentage != null)
        'transFatDailyPercentage': transFatDailyPercentage!,
      if (vitaminD != null) 'vitaminD': vitaminD!,
      if (vitaminDDailyPercentage != null)
        'vitaminDDailyPercentage': vitaminDDailyPercentage!,
      if (voluntaryNutritionFact != null)
        'voluntaryNutritionFact': voluntaryNutritionFact!,
    };