fromJson static method

Meal fromJson(
  1. dynamic json
)

Read a meal from parsed JSON.

Implementation

static Meal fromJson(dynamic json) => Meal(
      json['id'] as int,
      json['name'] as String,
      (json['notes'] as List<dynamic>).map((n) => '$n').toList(),
      json['prices']['students'] as double?,
      json['prices']['employees'] as double?,
      json['prices']['pupils'] as double?,
      json['prices']['others'] as double?,
      json['category'] as String,
    );