NutritionHealthValue class
A HealthValue object for nutrition.
Parameters:
- Inheritance
-
- Object
- Serializable
- HealthValue
- NutritionHealthValue
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)
Constructors
- NutritionHealthValue({String? mealType, double? protein, double? calories, double? fat, String? name, double? carbs, double? caffeine})
- NutritionHealthValue.fromHealthDataPoint(dynamic dataPoint)
-
Create a NutritionHealthValue based on a health data point from native data format.
factory
-
NutritionHealthValue.fromJson(Map<
String, dynamic> json) -
factory
Properties
- $type ↔ String?
-
The runtime class name (type) of this object.
Used for deserialization from JSON objects.
getter/setter pairinherited
- caffeine ↔ double?
-
The amount of caffeine in grams.
getter/setter pair
- calories ↔ double?
-
The amount of calories in kcal.
getter/setter pair
- carbs ↔ double?
-
The amount of carbs in grams.
getter/setter pair
- fat ↔ double?
-
The amount of fat in grams.
getter/setter pair
- fromJsonFunction → Function
-
The function which can convert a JSON string to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- jsonType → String
-
Return the
__type
to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.no setterinherited - mealType ↔ String?
-
The type of meal.
getter/setter pair
- name ↔ String?
-
The name of the food.
getter/setter pair
- protein ↔ double?
-
The amount of protein in grams.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Return a JSON encoding of this object.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override