WeightRecord class

A class representing a weight record.

Constructors

WeightRecord({int? id, int createdAt = 0})
Constructs a WeightRecord instance with the specified parameters.
factory
WeightRecord.fromJson(Map<String, dynamic> json)
Constructs a WeightRecord instance from a JSON object.
factory

Properties

createdAt int
The timestamp indicating when the weight record was created.
final
hashCode int
Overrides the hashCode method.
no setteroverride
id int?
The unique identifier for the weight record.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? id, double? weight, int? createdAt}) WeightRecord
Creates a copy of the current weight record with the specified attributes overridden.
getWeight({MeasurementSystem? unit}) double
Retrieves the weight value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setWeight(double weight, {MeasurementSystem? unit}) → void
Sets the weight value.
toJson() Map<String, dynamic>
Converts the weight record instance to a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Overrides the equality operator.
override