Meal.fromJson constructor
Meal.fromJson(
- dynamic json
Read a meal from parsed JSON.
Implementation
factory Meal.fromJson(json) => Meal(
id: json['id'] as int,
name: json['name'] as String,
notes: (json['notes'] as List<dynamic>).map((n) => '$n').toList(),
studentPrice: json['prices']['students'] as double?,
employeePrice: json['prices']['employees'] as double?,
pupilPrice: json['prices']['pupils'] as double?,
othersPrice: json['prices']['others'] as double?,
category: json['category'] as String,
);