getOldSyncedAppleHealthElements method
Implementation
List<AppleHealthElement> getOldSyncedAppleHealthElements() {
final todayMinusSevenDays =
DateTime.now().subtract(const Duration(days: 7));
return appleHealthElementBox!.values.where((element) {
final date = DateTime.tryParse(element.syncedDate ?? '');
if (date == null) return true;
return (element.synced ?? false) && date.isBefore(todayMinusSevenDays);
}).toList();
}