WorkoutStepDurationValueField constructor

WorkoutStepDurationValueField({
  1. int size = 0,
  2. bool growable = true,
})

Implementation

WorkoutStepDurationValueField({int size = 0, bool growable = true})
    : super(
          name: 'duration_value',
          id: ID,
          type: BaseType.UINT32,
          offset: 0,
          scale: 1,
          size: size,
          growable: growable,
          subFields: [
            SubField(
                name: 'duration_time',
                type: BaseType.UINT32,
                scale: 1000,
                offset: 0,
                units: 's',
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [0, 28]
                }),
            SubField(
                name: 'duration_distance',
                type: BaseType.UINT32,
                scale: 100,
                offset: 0,
                units: 'm',
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [1]
                }),
            SubField(
                name: 'duration_hr',
                type: BaseType.UINT32,
                scale: 1,
                offset: 0,
                units: '% or bpm',
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [2, 3]
                }),
            SubField(
                name: 'duration_calories',
                type: BaseType.UINT32,
                scale: 1,
                offset: 0,
                units: 'calories',
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [4]
                }),
            SubField(
                name: 'duration_step',
                type: BaseType.UINT32,
                scale: 1,
                offset: 0,
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [
                    6,
                    7,
                    8,
                    9,
                    10,
                    11,
                    12,
                    13
                  ]
                }),
            SubField(
                name: 'duration_power',
                type: BaseType.UINT32,
                scale: 1,
                offset: 0,
                units: '% or watts',
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [14, 15]
                }),
            SubField(
                name: 'duration_reps',
                type: BaseType.UINT32,
                scale: 1,
                offset: 0,
                referenceMap: {
                  WorkoutStepDurationTypeField.ID: [29]
                })
          ]);