Skip to content

Conversation

klnfreedom
Copy link

This PR introduces a new field, rawWorkoutActivityType, to the WorkoutHealthValue model. The primary motivation for this addition is to retain the original workout activity type string from the native health data provider (e.g., Apple Health or Google Fit).

Currently, workoutActivityType relies on a predefined HealthWorkoutActivityType enum, which does not cover all possible activity types provided by health platforms. As a result, any unsupported type defaults to HealthWorkoutActivityType.OTHER, leading to loss of information and granularity.

By storing the raw string in rawWorkoutActivityType, we can:

Preserve the exact source activity type for downstream processing or analytics.

Enable future extensions or mappings without data loss.

Improve compatibility with custom or newer activity types not yet reflected in the enum.

This change is backward-compatible and does not affect existing functionality that relies on the enum, while making the system more extensible and robust for real-world data.

@iarata
Copy link
Contributor

iarata commented Oct 14, 2025

@klnfreedom Thanks for the PR!
We were in the process of moving the health package to its own repo and could you please send your PR to the https://github.com/carp-dk/carp-health-flutter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants