feat(screenshots): CC0/PD example photos for all visible varieties (+CREDITS)
This commit is contained in:
parent
416fd7153b
commit
ab027a8779
38 changed files with 30 additions and 13 deletions
|
|
@ -168,13 +168,17 @@ Future<SeededInventory> seedShowcase(
|
|||
return id;
|
||||
}
|
||||
|
||||
// A real photo of red & white flint corn is the hero variety, so the detail
|
||||
// shot shows a genuine seed photo. Loaded from the committed test fixture
|
||||
// (CWD is the package root under `flutter test`).
|
||||
final maizePhoto = await File(
|
||||
'test/screenshots/fixtures/maize.jpg',
|
||||
).readAsBytes();
|
||||
final maize = await add('Painted flint corn', 'Poaceae', photo: maizePhoto);
|
||||
// Example photos are CC0 / public domain (see fixtures/CREDITS.md), except the
|
||||
// maize which is vjrj's own; loaded from the committed fixtures (CWD is the
|
||||
// package root under `flutter test`). The maize is the hero for the detail shot.
|
||||
Future<Uint8List> photo(String name) =>
|
||||
File('test/screenshots/fixtures/$name.jpg').readAsBytes();
|
||||
|
||||
final maize = await add(
|
||||
'Painted flint corn',
|
||||
'Poaceae',
|
||||
photo: await photo('maize'),
|
||||
);
|
||||
await repo.addLot(
|
||||
varietyId: maize,
|
||||
harvestYear: 2024,
|
||||
|
|
@ -190,12 +194,12 @@ Future<SeededInventory> seedShowcase(
|
|||
offerStatus: OfferStatus.exchange,
|
||||
);
|
||||
|
||||
// The rest sit in families that sort at/after Poaceae, so the maize (and its
|
||||
// photo) stays the first, top-of-list group in the inventory shot.
|
||||
await add('Common buckwheat', 'Polygonaceae');
|
||||
await add('Alpine strawberry', 'Rosaceae');
|
||||
await add('Cherry tomato', 'Solanaceae');
|
||||
await add('Sweet pepper', 'Solanaceae');
|
||||
// The rest sit in families that sort at/after Poaceae, so the maize stays the
|
||||
// first, top-of-list group in the inventory shot. Each carries a CC0/PD photo.
|
||||
await add('Common buckwheat', 'Polygonaceae', photo: await photo('buckwheat'));
|
||||
await add('Wild raspberry', 'Rosaceae', photo: await photo('raspberry'));
|
||||
await add('Slicing tomato', 'Solanaceae', photo: await photo('tomato'));
|
||||
await add('Guajillo chilli', 'Solanaceae', photo: await photo('pepper'));
|
||||
|
||||
return SeededInventory(maize);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue