selectedCycle property

ProjectCycle? get selectedCycle

Implementation

ProjectCycle? get selectedCycle {
  final selectedCycle = RegistrationDeliverySingleton()
      .projectType
      ?.cycles
      ?.where(
        (e) =>
            (e.startDate) < DateTime.now().millisecondsSinceEpoch &&
            (e.endDate) > DateTime.now().millisecondsSinceEpoch,
        // Return null when no matching cycle is found
      )
      .firstOrNull;

  if (selectedCycle == null) {
    return null;
  }

  return selectedCycle;
}