MenstrualCycleWidget class

Properties

hashCode int
The hash code for this object.
no setterinherited
pastAllPeriodDays List<String>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDummyData({int numberOfDay = 365, Function? onSuccess, Function? onError, List<SymptomsData>? symptomsData}) Future<void>
calculateLastPeriodDate() Future<List<String>>
get last period and all past period date from database based on configuration
clearAllData() Future<void>
Clear all logs data
clearPeriodLog() → dynamic
Clear user's log details
decryptText(String encryptedText) Future<String>
get encrypt text
encryptText(String normalText) Future<String>
get encrypt text
getAllPeriodsDetails() Future<List<PeriodsDateRange>>
get all period details like period start date, period end date, period duration and all period dates. Default is object of PeriodsDateRange
getAllSymptomsData() Future<List<UserSymptomsLogs>>
Return All UserSymptomsLogs for backup
getAvgCycleLength() Future<int>
get average cycle length. Default is 0
getAvgPeriodDuration() Future<int>
get average period duration. Default is 0
getBackupOfMenstrualCycleData({bool isEncryptData = true}) Future<Map<String, dynamic>>
Get All Menstrual cycle data for backup
getCurrentCycleDay() Future<int>
get Current day of cycle
getCurrentDateFormat() DateFormats
getCurrentPeriodDay() Future<int>
get current period day
getCurrentPhaseName() Future<String>
get current phase name based on cycle day
getCurrentPregnancyDay() Future<int>
get Current day of pregnancy
getCurrentPregnancyMonth() Future<int>
get Current month of pregnancy
getCurrentPregnancyWeek() Future<int>
get Current week of pregnancy
getCurrentTrimester() Future<int>
get Current trimester of pregnancy
getCustomerId() String
getCycleLength() int
getCycleRegularityScore() Future<double>
Calculate cycle regularity score
getCycleRegularityScoreStatus() Future<String>
Calculate cycle regularity score status
getDrinkWaterLog({required DateTime? startDate, required DateTime? endDate, WaterUnits? waterUnits = WaterUnits.ml, int pageNumber = 1, int itemsPerPage = 7}) Future<List<WaterData>>
get user's drink water logs
getExpectedDueDate() Future<String>
get Expected Due Date for baby
getExpectedPregnancyTestDate() Future<String>
get expected pregnancy test date
getFollicularDayCounts() int
Get follicular day count
getIvKey() String
getMeditationLog({required DateTime? startDate, required DateTime? endDate, int pageNumber = 1, int itemsPerPage = 7}) Future<List<MeditationData>>
get user's meditation logs
getMenstrualCycleSummary({DateTime? summaryStartDate, DateTime? summaryEndDate, bool fetchAllData = false}) Future<Map<String, dynamic>>
get matrix summary data btn two date
getMinMaxBodyTemperature({BodyTemperatureUnits? bodyTemperatureUnits = BodyTemperatureUnits.celsius}) Future<Map<String, int>>
Get min and max body temperature of current user
getMinMaxDrinkWater({WaterUnits? waterUnits = WaterUnits.ml}) Future<Map<String, double>>
Get min and max drink water of current user
getMinMaxMeditationTime() Future<Map<String, double>>
Get meditation time current user
getMinMaxSleepTimeLog() Future<Map<String, int>>
Get min and max sleep time log of current user
getMinMaxWeightLog({WeightUnits? weightUnits = WeightUnits.kg}) Future<Map<String, double>>
Get min and max wight of current user
getNextOvulationDate() Future<String>
get Next Predicted Period Date
getNextPredictedPeriodDate() Future<String>
get Next Predicted Period Date
getPeriodDuration() int
getPeriodRegularityScore() Future<double>
Calculate period regularity score
getPeriodRegularityScoreStatus() Future<String>
Calculate period regularity score status
getPhaseId() Future<int>
getPregnancyChances() Future<String>
get expected pregnancy test date
getPreviousCycleLength() Future<int>
get last cycle length. Default is 0
getPreviousPeriodDate() Future<DateTime>
get last period date. Default is 1971-01-01
getPreviousPeriodDateRange() Future<PeriodsDateRange>
get last period date. Default is object of PeriodsDateRange
getPreviousPeriodDay() String
getPreviousPeriodDuration() Future<int>
get last period duration. Default is 0
getRandomItems(List<SymptomsData> list, int count) List<SymptomsData>
getRandomSymptomsData(List<SymptomsData>? symptomsData) List<SymptomsData>
getSecretKey() String
getSleepLog({required DateTime? startDate, required DateTime? endDate, int pageNumber = 1, int itemsPerPage = 7}) Future<List<SleepData>>
get user's sleep data
getSymptomsData(DateTime? symptomsLogDate) Future<UserSymptomsLogs>
Return UserSymptomsLogs based on log date
getSymptomsId(DateTime? symptomsLogDate) Future<List<int>>
get Today's symptoms ids
getSymptomsLogReport({required DateTime? startDate, required DateTime? endDate, int pageNumber = 1, int itemsPerPage = 7, bool isRequiredPagination = false}) Future<List<UserLogReportData>>
get symptoms log report BETWEEN start & end date based on userId
getSymptomsName(int symptomsId) → dynamic
get symptoms name
getSymptomsPattern({bool isForTomorrow = false}) Future<List<SymptomsCount>>
Get symptoms patter for today or tomorrow
getSymptomsPatternBasedOnCycle({int numberOfCycle = 5}) Future<List<SymptomsPattern>>
getSymptomsPatternBasedOnCycleOld({int numberOfCycle = 5}) Future<List<SymptomsPattern>>
get Symptoms Pattern based on cycle
getTemperatureLog({required DateTime? startDate, required DateTime? endDate, BodyTemperatureUnits? bodyTemperatureUnits = BodyTemperatureUnits.celsius, int pageNumber = 1, int itemsPerPage = 7}) Future<List<BodyTemperatureData>>
get user's temperature data
getTodaySymptomsLog() Future<List<UserLogReportData>>
get Today's symptoms logs
getWeightLog({required DateTime? startDate, required DateTime? endDate, WeightUnits? weightUnits = WeightUnits.kg, int pageNumber = 1, int itemsPerPage = 7}) Future<List<WeightData>>
get user's wight logs
hasBodyTemperatureGraphData() Future<bool>
Check if have body temperature graph data
hasCycleHistoryGraphData() Future<bool>
Check if have cycle history graph data
hasCycleTrendsGraphData() Future<bool>
Check if have cycle trends graph data
hasMeditationGraphData() Future<bool>
Check if have meditation graph data
hasPeriodGraphData() Future<bool>
Check if have period graph data
hasSleepGraphData() Future<bool>
Check if have sleep graph data
hasWaterGraphData() Future<bool>
Check if have water graph data
hasWeightGraphData() Future<bool>
Check if have weight graph data
initialize({required String secretKey, required String ivKey}) → void
Initialize MenstrualCycleWidget
isOvulationDay() Future<bool>
check if today is ovulation day
isPeriodStarted() Future<bool>
check if period started
isPeriodStartFromToday() Future<bool>
to check today is period day
isPeriodStartFromTomorrow() Future<bool>
to check tomorrow is period day
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreBackupOfMenstrualCycleData({bool isDecryptData = true, required Map<String, dynamic> backupData, required String customerId}) Future<bool>
Restore backup of user's data
saveSymptomsLogs({required List<SymptomsData>? userSymptomsData, required Function? onSuccess, required Function? onError, DateTime? symptomsLogDate, String meditationTime = "0", TimeOfDay? sleepWakeUpTime, TimeOfDay? sleepBedTime, int cycleDay = 0, String waterValue = "0", WaterUnits waterUnit = WaterUnits.liters, String customNotes = "", String weight = "0", WeightUnits weightUnit = WeightUnits.kg, String bodyTemperature = "0", BodyTemperatureUnits bodyTemperatureUnit = BodyTemperatureUnits.celsius, bool isCustomLogs = true}) → dynamic
----------------------- Custom Functions -----------------------/// insert user's period data on userId and log date
setCurrentUserData(String customerId, int cycleLength, int periodDuration) → dynamic
toString() String
A string representation of this object.
inherited
updateConfiguration({required int? cycleLength, required int? periodDuration, String? customerId = "0", DateTime? lastPeriodDate, bool isClearData = false, String fontFamily = "", DateFormats dateFormat = DateFormats.dmy, Languages defaultLanguage = Languages.english}) → void
Update configuration of MenstrualCycleWidget
updateLanguageConfiguration({Languages defaultLanguage = Languages.english}) → void
Update language of menstrual cycle

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

currentLanguage Languages
getter/setter pair
defaultFontFamily String
getter/setter pair
instance MenstrualCycleWidget?
getter/setter pair

Static Methods

init({required String? secretKey, required String? ivKey}) MenstrualCycleWidget
Initialize MenstrualCycleWidget