fromLocalDBMap static method
Constructs a Meal instance from a Map for local DB use.
This version expects the map to contain keys 'fat_level', 'sugar_level', and 'name' (for mealType). The year, month, and day are handled separately via arguments (since they're likely coming from a joined query).
Implementation
static Meal fromLocalDBMap(Map<String, dynamic> map, int year, int month, int day) {
return Meal(
year: year,
month: month,
day: day,
mealType: map['name'], // meal type name from local DB
fatLevel: map['fat_level'],
sugarLevel: map['sugar_level'],
);
}