saveGoogleHealthConnectElement method
Implementation
Future<int> saveGoogleHealthConnectElement(
GoogleHealthConnectElement element) async {
final recordedElement =
await getGoogleHealthConnectElementByDateAndParameter(
element.type ?? '',
element.dateFrom ?? '',
element.dateTo ?? '',
element.healthValue ?? '',
);
if (recordedElement == null) {
return googleHealthConnectElementBox!.add(element);
}
return 0;
}