of static method

Phase of({
  1. required FlexiDate? startDate,
  2. FlexiDate? endDate,
  3. required String? phaseKey,
  4. required String? name,
  5. String? description,
  6. IImageContent? mainPhoto,
  7. List<IImageContent>? photos,
  8. List<IVideoContent>? videos,
  9. IPhysicalLocation? location,
})

Implementation

static Phase of(
    {required FlexiDate? startDate,
    FlexiDate? endDate,
    required String? phaseKey,
    required String? name,
    String? description,
    IImageContent? mainPhoto,
    List<IImageContent>? photos,
    List<IVideoContent>? videos,
    IPhysicalLocation? location}) {
  final self = Phase(<String, dynamic>{}, mtype: PhaseRef, update: true);
  if (startDate != null) self.startDate = startDate;
  if (endDate != null) self.endDate = endDate;
  if (phaseKey != null) self.phaseKey = phaseKey;
  if (name != null) self.name = name;
  if (description != null) self.description = description;
  if (mainPhoto != null) self.mainPhoto = mainPhoto;
  if (photos != null) self.photos = photos;
  if (videos != null) self.videos = videos;
  if (location != null) self.location = location;
  return self;
}