mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Automatic linting
This commit is contained in:
@@ -7,8 +7,15 @@ part of 'log.dart';
|
||||
// **************************************************************************
|
||||
|
||||
Log _$LogFromJson(Map<String, dynamic> json) {
|
||||
$checkKeys(json,
|
||||
requiredKeys: const ['id', 'meal', 'plan', 'datetime', 'ingredient', 'weight_unit', 'amount']);
|
||||
$checkKeys(json, requiredKeys: const [
|
||||
'id',
|
||||
'meal',
|
||||
'plan',
|
||||
'datetime',
|
||||
'ingredient',
|
||||
'weight_unit',
|
||||
'amount'
|
||||
]);
|
||||
return Log(
|
||||
id: json['id'] as int?,
|
||||
ingredientId: json['ingredient'] as int,
|
||||
|
||||
@@ -106,9 +106,9 @@ NutritionalPlan getNutritionalPlan() {
|
||||
plan.meals = [meal1, meal2];
|
||||
|
||||
// Add logs
|
||||
plan.logs.add(Log.fromMealItem(mealItem1, 1,1, DateTime(2021, 6, 1)));
|
||||
plan.logs.add(Log.fromMealItem(mealItem2, 1,1, DateTime(2021, 6, 1)));
|
||||
plan.logs.add(Log.fromMealItem(mealItem3, 1,1, DateTime(2021, 6, 10)));
|
||||
plan.logs.add(Log.fromMealItem(mealItem1, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.logs.add(Log.fromMealItem(mealItem2, 1, 1, DateTime(2021, 6, 1)));
|
||||
plan.logs.add(Log.fromMealItem(mealItem3, 1, 1, DateTime(2021, 6, 10)));
|
||||
|
||||
return plan;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user