Initial commit: CookIT recipe collection and week planner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
7d7a0bc60b
173 files changed
+22803
No files matched your search
@@ -0,0 +1,55 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cookit/src/recipes/models/recipe.dart';
|
||||
import 'package:cookit/src/recipes/photo_store.dart';
|
||||
|
||||
final testTime = DateTime.utc(2026, 10, 20, 12);
|
||||
|
||||
Recipe recipe({
|
||||
String id = 'r1',
|
||||
String name = 'Focaccia',
|
||||
String? courseId,
|
||||
List<String> tags = const [],
|
||||
List<IngredientGroup>? ingredientGroups,
|
||||
List<StepSection>? stepSections,
|
||||
List<String> photos = const [],
|
||||
bool favourite = false,
|
||||
List<String> reviewReasons = const [],
|
||||
}) => Recipe(
|
||||
id: id,
|
||||
name: name,
|
||||
courseId: courseId,
|
||||
tags: tags,
|
||||
servings: 4,
|
||||
prepMinutes: 30,
|
||||
cookMinutes: 20,
|
||||
calories: const Calories(775, CaloriesBasis.perServing),
|
||||
ingredientGroups:
|
||||
ingredientGroups ??
|
||||
const [
|
||||
IngredientGroup(
|
||||
lines: [
|
||||
IngredientLine(amount: 300, unitKey: 'gram', name: 'Mehl'),
|
||||
IngredientLine(amount: 2, amountMax: 3, unitKey: 'tablespoon', name: 'Olivenöl', remark: 'gutes'),
|
||||
],
|
||||
),
|
||||
IngredientGroup(
|
||||
name: 'Topping',
|
||||
lines: [IngredientLine(name: 'Rosmarin')],
|
||||
),
|
||||
],
|
||||
stepSections:
|
||||
stepSections ??
|
||||
const [
|
||||
StepSection(title: 'Teig', steps: ['Kneten.', 'Gehen lassen.']),
|
||||
],
|
||||
photos: photos,
|
||||
sources: const ['https://example.org/focaccia'],
|
||||
notes: '22x22 cm Form',
|
||||
favourite: favourite,
|
||||
reviewReasons: reviewReasons,
|
||||
createdAt: testTime,
|
||||
updatedAt: testTime,
|
||||
);
|
||||
|
||||
Future<PhotoStore> tempPhotoStore() async => PhotoStore(await Directory.systemTemp.createTemp('cookit_photos_'));
|
||||
Reference in new issue
Block a user