requestAuthorization method

Future<bool> requestAuthorization(
  1. List<HealthPermission> healthPermissions
)

Implementation

Future<bool> requestAuthorization(
    List<HealthPermission> healthPermissions) async {
  final types =
      healthPermissions.map<HealthDataType>((e) => e.healthDataType).toList();
  final permissions = healthPermissions
      .map<HealthDataAccess>((e) => e.healthDataAccess)
      .toList();
  return health.requestAuthorization(types, permissions: permissions);
}