DataType class

Data types defined by HUAWEI Health Kit.

Each data type has a unique name for the identification purpose. Each data type has its own meaning. For example, DT_CONTINUOUS_STEPS_DELTA indicates the number of steps taken since the last reading.

You can also create you own data types with the

Constructors

DataType(String name, String scopeNameRead, String scopeNameWrite, List<Field> fields, {bool isPolymerizedFlag = false, bool isSelfDefined = false, String packageName = ''})
const
DataType.fromMap(Map map)
factory

Properties

fields List<Field>
Attribute list.
final
hashCode int
The hash code for this object.
no setterinherited
isPolymerizedFlag bool
Indicates whether it is a grouped data type.
final
isSelfDefined bool
Whether the data type is a customized one.
final
name String
Name. The value must be a string of 1 to 300 characters.
final
packageName String
App package name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeNameRead String
Read permission of the data type.
final
scopeNameWrite String
Write permission of the data type.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getMimeType(DataType dataType) String
toMapList(List<DataType> list) List<Map<String, dynamic>>

Constants

DT_ACTIVITY_FEATURE_BASKETBALL → const DataType
DT_ACTIVITY_FEATURE_BREATH_HOLDING_TEST → const DataType
Apnea testing.
DT_ACTIVITY_FEATURE_BREATH_HOLDING_TRAIN → const DataType
Apnea training.
DT_ACTIVITY_FEATURE_FREEDIVING → const DataType
DT_ACTIVITY_FEATURE_GOLF → const DataType
Golf feature.
DT_ACTIVITY_FEATURE_JUMPING_ROPE → const DataType
DT_ACTIVITY_FEATURE_SKIING → const DataType
Skiing feature.
DT_ACTIVITY_FEATURE_SNOWBOARDING → const DataType
Snowboarding feature.
DT_ACTIVITY_FEATURE_SWIMMING_OPEN_WATER → const DataType
Feature statistics of swimming in open waters.
DT_ACTIVITY_FEATURE_SWIMMING_POOL → const DataType
Feature statistics of swimming in open waters.
DT_CONTINUOUS_ACTIVITY_FRAGMENT → const DataType
DT_CONTINUOUS_ACTIVITY_SEGMENT → const DataType
DT_CONTINUOUS_ALTITUDE_STATISTICS → const DataType
DT_CONTINUOUS_BIKING_PEDALING_TOTAL → const DataType
Total mileage of the bicycle since the start of the count (unit: meter).
DT_CONTINUOUS_BIKING_WHEEL_ROTATION_TOTAL → const DataType
Number of rotations of the bicycle wheel within a period of time.
DT_CONTINUOUS_CALORIES_BURNT → const DataType
This field is mandatory.
DT_CONTINUOUS_CALORIES_BURNT_TOTAL → const DataType
Total calories.
DT_CONTINUOUS_CALORIES_CONSUMED → const DataType
Calories consumed within a period of time (unit: kcal).
DT_CONTINUOUS_DISTANCE_DELTA → const DataType
Distance covered since the last reading (unit: meter).
DT_CONTINUOUS_DISTANCE_TOTAL → const DataType
Accumulated distance covered (unit: meter).
DT_CONTINUOUS_EXERCISE_HEART_RATE_STATISTICS → const DataType
DT_CONTINUOUS_EXERCISE_INTENSITY → const DataType
Workout intensity.
DT_CONTINUOUS_EXERCISE_INTENSITY_V2 → const DataType
DT_CONTINUOUS_FREEDIVING_ASCENT_SPEED_STATISTICS → const DataType
DT_CONTINUOUS_FREEDIVING_DESCENT_SPEED_STATISTICS → const DataType
DT_CONTINUOUS_JUMP → const DataType
DT_CONTINUOUS_JUMP_STATISTICS → const DataType
DT_CONTINUOUS_RUN_POSTURE → const DataType
DT_CONTINUOUS_RUN_POSTURE_STATISTICS → const DataType
DT_CONTINUOUS_SKIP_SPEED_STATISTICS → const DataType
DT_CONTINUOUS_SLEEP → const DataType
Sleep details. For information about the input values of this data type, see SleepFragmentCategory.
DT_CONTINUOUS_STEPS_DELTA → const DataType
Steps taken since the last reading.
DT_CONTINUOUS_STEPS_RATE_STATISTIC → const DataType
Step cadence statistics.
DT_CONTINUOUS_STEPS_TOTAL → const DataType
Total number of steps.
DT_CONTINUOUS_STROKE_RATE_STATISTICS → const DataType
Rowing stroke rate statistics.
DT_CONTINUOUS_SWIMMING_STROKE_RATE_STATISTICS → const DataType
Swimming stroke rate statistics.
DT_CONTINUOUS_SWIMMING_SWOLF_STATISTICS → const DataType
SWOLF statistics.
DT_CONTINUOUS_WORKOUT_DURATION → const DataType
Workout duration (unit: minute).
DT_DIVING_DEPTH → const DataType
DT_DIVING_DEPTH_STATISTICS → const DataType
DT_INSTANTANEOUS_ACTIVITY_SAMPLE → const DataType
A single activity type within a period of time.
DT_INSTANTANEOUS_ACTIVITY_SAMPLES → const DataType
Activity type within a period of time.
DT_INSTANTANEOUS_ALTITUDE → const DataType
DT_INSTANTANEOUS_BIKING_PEDALING_RATE → const DataType
Cycling speed at a time point (unit: m/s).
DT_INSTANTANEOUS_BIKING_WHEEL_ROTATION → const DataType
Instantaneous measurement of the rotational speed of the bicycle wheel per minute.
DT_INSTANTANEOUS_BODY_FAT_RATE → const DataType
Body fat rate.
DT_INSTANTANEOUS_BODY_WEIGHT → const DataType
Weight (unit: kg). This field is mandatory. The value range is (1, 560).
DT_INSTANTANEOUS_CALORIES_BMR → const DataType
Basic metabolic rate per day (unit: kcal).
DT_INSTANTANEOUS_EXERCISE_HEART_RATE → const DataType
DT_INSTANTANEOUS_FREEDIVING_ASCENT_SPEED → const DataType
DT_INSTANTANEOUS_FREEDIVING_DESCENT_SPEED → const DataType
DT_INSTANTANEOUS_HEART_RATE → const DataType
Heart rate (unit: heartbeats per minute).
DT_INSTANTANEOUS_HEIGHT → const DataType
Height (unit: meter). This field is mandatory. The value range is (0.4, 2.6).
DT_INSTANTANEOUS_HYDRATE → const DataType
Water taken over a single drink (unit: liter).
DT_INSTANTANEOUS_LOCATION_SAMPLE → const DataType
Location at a given time.
DT_INSTANTANEOUS_LOCATION_TRACE → const DataType
A point on the trajectory.
DT_INSTANTANEOUS_NUTRITION_FACTS → const DataType
Nutrient intake over a meal.
DT_INSTANTANEOUS_POWER_SAMPLE → const DataType
Instantaneous sampling of power.
DT_INSTANTANEOUS_RESTING_HEART_RATE → const DataType
DT_INSTANTANEOUS_RUN_FATIGUE_INDEX → const DataType
DT_INSTANTANEOUS_RUN_PHYSICAL_FITNESS_INDEX → const DataType
DT_INSTANTANEOUS_RUN_STATE_INDEX → const DataType
DT_INSTANTANEOUS_RUN_TRAINING_INDEX → const DataType
DT_INSTANTANEOUS_RUN_VDOT → const DataType
DT_INSTANTANEOUS_SKIP_SPEED → const DataType
DT_INSTANTANEOUS_SPEED → const DataType
Instantaneous speed to the ground (unit: m/s).
DT_INSTANTANEOUS_STEPS_RATE → const DataType
Number of steps per minute.
DT_INSTANTANEOUS_STRESS → const DataType
Pressure details.
DT_INSTANTANEOUS_STRESS_STATISTICS → const DataType
Pressure statistics.
DT_INSTANTANEOUS_STROKE_RATE → const DataType
Rowing stroke rate.
DT_INSTANTANEOUS_SWIMMING_STROKE_RATE → const DataType
Swimming stroke rate.
DT_INSTANTANEOUS_SWIMMING_SWOLF → const DataType
SWOLF.
DT_RESISTANCE → const DataType
Resistance set on devices like spinning bikes and elliptical machines.
DT_RESISTANCE_STATISTICS → const DataType
Resistance statistics set on devices like spinning bikes and elliptical machines.
DT_RESTING_HEART_RATE_STATISTICS → const DataType
DT_STATISTICS_EXERCISE_INTENSITY_V2 → const DataType
DT_STATISTICS_SLEEP → const DataType
Sleep statistics.
DT_UNUSED_DATA_TYPE → const DataType
Default data type.
DT_VO2MAX → const DataType
Maximum oxygen uptake.
DT_VO2MAX_STATISTICS → const DataType
Maximum oxygen uptake statistics.
DT_WATER_TEMPERATURE → const DataType
DT_WATER_TEMPERATURE_STATISTICS → const DataType
POLYMERIZE_BREATH_HOLDING_TRAIN_STATISTICS → const DataType
Apnea training sampling statistics.
POLYMERIZE_CALORIES_CONSUMED → const DataType
Total calories consumed.
POLYMERIZE_CALORIES_EXPENDED → const DataType
Total calories consumed within a period of time (unit: kcal).
POLYMERIZE_CONTINUOUS_ACTIVITY_STATISTICS → const DataType
Summarized statistics of a specific activity type within a period of time.
POLYMERIZE_CONTINUOUS_BODY_FAT_RATE_STATISTICS → const DataType
Body fat rate over a period of time (including the maximum, minimum, and average values).
POLYMERIZE_CONTINUOUS_BODY_WEIGHT_STATISTICS → const DataType
Weight over a period of time (including maximum, minimum, and average values in the unit of kg).
POLYMERIZE_CONTINUOUS_CALORIES_BMR_STATISTICS → const DataType
Average, maximum, and minimum basic metabolic rates over a period of time (unit: kcal).
POLYMERIZE_CONTINUOUS_EXERCISE_INTENSITY_STATISTICS → const DataType
Heartbeat intensity statistics.
POLYMERIZE_CONTINUOUS_HEART_RATE_STATISTICS → const DataType
Average, maximum, and minimum heartbeats per minute within a period of time.
POLYMERIZE_CONTINUOUS_HEIGHT_STATISTICS → const DataType
Height over a period of time (including maximum, minimum, and average values in the unit of meter).
POLYMERIZE_CONTINUOUS_LOCATION_BOUNDARY_RANGE → const DataType
Activity boundaries within a period of time.
POLYMERIZE_CONTINUOUS_NUTRITION_FACTS_STATISTICS → const DataType
Sum of nutrient intake over a period of time.
POLYMERIZE_CONTINUOUS_POWER_STATISTICS → const DataType
Power within a period of time (including the maximum, minimum, and average power in the unit of watt).
POLYMERIZE_CONTINUOUS_SPEED_STATISTICS → const DataType
Ground speed (including the maximum, minimum, and average speed in the unit of m/s).
POLYMERIZE_CONTINUOUS_WORKOUT_DURATION → const DataType
Workout duration over a period of time (unit: minute).
POLYMERIZE_DISTANCE_DELTA → const DataType
Distance increment within a period of time.
POLYMERIZE_FREEDIVING_STATISTICS → const DataType
Free diving sampling statistics.
POLYMERIZE_HYDRATION → const DataType
Water intake over a period of time (unit: liter).
POLYMERIZE_STEP_COUNT_DELTA → const DataType
Step increment within a period of time.