NutrientModel class

Annotations

Constructors

NutrientModel({required String name, required double quantity, required String unit})
const
factory

Properties

copyWith → $NutrientModelCopyWith<NutrientModel>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
name String
no setterinherited
quantity double
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit String
no setterinherited
unitConvertedQuantity double
定義した単位に換算した栄養素の量
no setter

Methods

convertNatriumUnit({required double fromValue, required String fromUnit}) double
塩分の単位換算
convertUnit({required MealRecordNutrientType type, required double fromValue, required String fromUnit}) double
単位換算する 表示用単位と同一であればそのままの値を返す 定義のない単位は0を返す
convertWaterUnit({required double fromValue, required String fromUnit}) double
水分の単位換算
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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