getGoogleHealthConnectElementByDateAndParameter method

Future<GoogleHealthConnectElement?> getGoogleHealthConnectElementByDateAndParameter(
  1. String? type,
  2. String? from,
  3. String? to
)

Implementation

Future<GoogleHealthConnectElement?>
    getGoogleHealthConnectElementByDateAndParameter(
  String? type,
  String? from,
  String? to,
) async {
  try {
    return googleHealthConnectElementBox!.values.firstWhere((element) =>
        element.type == type &&
        element.dateFrom == from &&
        element.dateTo == to);
  } catch (_) {}
  return null;
}