Import sorgenti Flutter di Henflow (export da Nextcloud: lib/ + documenti di progetto)
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
class BreedCatalogItem {
|
||||
final String id;
|
||||
final String name;
|
||||
final String description;
|
||||
final String eggColor;
|
||||
final double eggsPerHenPerDay;
|
||||
final String assetPath;
|
||||
|
||||
const BreedCatalogItem({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.eggColor,
|
||||
required this.eggsPerHenPerDay,
|
||||
required this.assetPath,
|
||||
});
|
||||
}
|
||||
|
||||
const List<BreedCatalogItem> breedCatalog = [
|
||||
BreedCatalogItem(
|
||||
id: 'marans',
|
||||
name: 'name_marans',
|
||||
description: 'desc_marans',
|
||||
eggColor: 'color_dark_brown',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/marans.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'araucana',
|
||||
name: 'name_araucana',
|
||||
description: 'desc_araucana',
|
||||
eggColor: 'color_blue',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/araucana.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'olive',
|
||||
name: 'name_olive',
|
||||
description: 'desc_olive',
|
||||
eggColor: 'color_olive',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/olive.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'livorno',
|
||||
name: 'name_livorno',
|
||||
description: 'desc_livorno',
|
||||
eggColor: 'color_white',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/livorno.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'sussex',
|
||||
name: 'name_sussex',
|
||||
description: 'desc_sussex',
|
||||
eggColor: 'color_cream',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/sussex.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'australorp',
|
||||
name: 'name_australorp',
|
||||
description: 'desc_australorp',
|
||||
eggColor: 'color_light_brown',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/australorp.jpg',
|
||||
),
|
||||
BreedCatalogItem(
|
||||
id: 'generic',
|
||||
name: 'name_generic',
|
||||
description: 'desc_generic',
|
||||
eggColor: 'color_light_brown',
|
||||
eggsPerHenPerDay: 1.0,
|
||||
assetPath: 'assets/breeds/generic.jpg',
|
||||
),
|
||||
];
|
||||
|
||||
BreedCatalogItem breedFromId(String id) {
|
||||
return breedCatalog.firstWhere(
|
||||
(e) => e.id == id,
|
||||
orElse: () => breedCatalog.first,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user