toJson method

Map<String, dynamic> toJson()

Converts the PassioFoodMetadata instance to a JSON map.

Implementation

Map<String, dynamic> toJson() => {
      'barcode': barcode,
      'ingredientsDescription': ingredientsDescription,
      'foodOrigins': foodOrigins?.map((e) => e.toJson()).toList(),
      'tags': tags,
    };