|
|
|
|
@ -99,7 +99,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
} else if (value == 1) {
|
|
|
|
|
getMonthlyHeartRateData();
|
|
|
|
|
} else {
|
|
|
|
|
// getYearlyHeartRateData();
|
|
|
|
|
getYearlyHeartRateData();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -109,11 +109,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
children: [
|
|
|
|
|
isWeeklyDataLoaded ? getWeeklyHeartRateDetails() : Container(),
|
|
|
|
|
isMonthlyDataLoaded ? getMonthlyHeartRateDetails() : Container(),
|
|
|
|
|
// isYearlyDataLoaded ? getYearlyDistanceDetails() : Container()
|
|
|
|
|
|
|
|
|
|
// Container(),
|
|
|
|
|
// Container(),
|
|
|
|
|
Container()
|
|
|
|
|
isYearlyDataLoaded ? getYearlyHeartRateDetails() : Container()
|
|
|
|
|
],
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
),
|
|
|
|
|
@ -183,13 +179,13 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
yearlyDataLength = 0;
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
service.getPatientHealthDataStats(7, 3, context).then((res) {
|
|
|
|
|
service.getPatientHealthDataStats(3, 3, context).then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
yearlyHearRateList.clear();
|
|
|
|
|
res['Med_GetYearTransactionsStsList'].forEach((element) {
|
|
|
|
|
yearlyHearRateList.add(new YearlyHeartRateResModel.fromJson(element));
|
|
|
|
|
if (element['ValueSum'] != null) {
|
|
|
|
|
num value = element['ValueSum'];
|
|
|
|
|
if (element['ValueAvg'] != null) {
|
|
|
|
|
num value = element['ValueAvg'];
|
|
|
|
|
avgYearlyHearRateValue += value;
|
|
|
|
|
yearlyDataLength++;
|
|
|
|
|
}
|
|
|
|
|
@ -264,6 +260,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
timeSeries: weeklyTimeSeriesData,
|
|
|
|
|
indexes: weeklyTimeSeriesData.length ~/ 5.5,
|
|
|
|
|
horizontalInterval: 8,
|
|
|
|
|
isWeeklyOrMonthly: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
@ -339,6 +336,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
timeSeries: monthlyTimeSeriesData,
|
|
|
|
|
indexes: monthlyTimeSeriesData.length ~/ 5.5,
|
|
|
|
|
horizontalInterval: 8,
|
|
|
|
|
isWeeklyOrMonthly: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
@ -424,11 +422,11 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).avgDistance, style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
child: Text(TranslationBase.of(context).avgHeartRate, style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 10.0),
|
|
|
|
|
child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).km_, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
|
|
|
|
|
child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).bpm, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|