Grocery.fromJson constructor

Grocery.fromJson(
  1. Map json_
)

Implementation

Grocery.fromJson(core.Map json_)
    : this(
        activeIngredients: json_.containsKey('activeIngredients')
            ? json_['activeIngredients'] as core.String
            : null,
        alcoholByVolume: json_.containsKey('alcoholByVolume')
            ? (json_['alcoholByVolume'] as core.num).toDouble()
            : null,
        allergens: json_.containsKey('allergens')
            ? json_['allergens'] as core.String
            : null,
        derivedNutritionClaim: json_.containsKey('derivedNutritionClaim')
            ? (json_['derivedNutritionClaim'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        directions: json_.containsKey('directions')
            ? json_['directions'] as core.String
            : null,
        indications: json_.containsKey('indications')
            ? json_['indications'] as core.String
            : null,
        ingredients: json_.containsKey('ingredients')
            ? json_['ingredients'] as core.String
            : null,
        nutritionClaim: json_.containsKey('nutritionClaim')
            ? (json_['nutritionClaim'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        storageInstructions: json_.containsKey('storageInstructions')
            ? json_['storageInstructions'] as core.String
            : null,
      );