Automatic linting

This commit is contained in:
Github-actions
2021-10-23 13:46:41 +00:00
parent 6a19a0697e
commit a2ae840c62
2 changed files with 12 additions and 5 deletions

View File

@@ -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,

View File

@@ -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;
}