getAppleHealthSyncDate method

Future<DateTime> getAppleHealthSyncDate()

Implementation

Future<DateTime> getAppleHealthSyncDate() async {
  final appleHealthSyncDate =
      await storage.read(key: _appleHealthSyncDate) ?? '';
  try {
    return DateTime.parse(appleHealthSyncDate.toString());
  } catch (e) {
    return getAppleHealthAccessGrantedDate();
  }
}