getHealthPermissionsFromApi function

Future<List<HealthPermission>> getHealthPermissionsFromApi(
  1. List<AppleQuantityTypeClient?> quantityTypes,
  2. List<AppleCategoryTypeClient?> categoryTypes,
  3. List<GoogleParameterTypeClient?> parameterTypes
)

Implementation

Future<List<HealthPermission>> getHealthPermissionsFromApi(
    List<AppleQuantityTypeClient?> quantityTypes,
    List<AppleCategoryTypeClient?> categoryTypes,
    List<GoogleParameterTypeClient?> parameterTypes) async {
  final parameterHealthPermissions =
      await convertParameterTypesToHealthDataType(parameterTypes);
  return [
    ...covertQuantityTypesToHealthDataType(quantityTypes),
    ...covertCategoryTypesToHealthDataType(categoryTypes),
    ...parameterHealthPermissions,
  ];
}