getCurrentCycleDay method
get Current day of cycle
Implementation
Future<int> getCurrentCycleDay() async {
final dbHelper = MenstrualCycleDbHelper.instance;
int currentDayCycle = 0;
String lastPeriodDate = await dbHelper.getLastPeriodDate();
if (lastPeriodDate.isNotEmpty) {
currentDayCycle =
DateTime.now().difference(DateTime.parse(lastPeriodDate)).inDays + 1;
}
return currentDayCycle;
}