GardenPlanner/lib/entities/plant.dart

30 lines
578 B
Dart
Raw Normal View History

2023-06-25 10:15:30 +02:00
import 'plant_time.dart';
2023-06-25 10:13:39 +02:00
class Plant {
final String name;
final double waterRequirement;
final double horizontalSpace;
final double verticalSpace;
final int id;
String? image;
String? supType;
List<PlantTime> times = [];
Plant({
String? imagePath,
List<PlantTime>? times,
required this.name,
required this.waterRequirement,
required this.horizontalSpace,
required this.verticalSpace,
required this.id,
required this.supType,
}) {
image = imagePath;
if (times != null) {
this.times.addAll(times);
}
}
}