BPObservation class
Model class representing a blood pressure observation.
Stores complete blood pressure measurements including systolic/diastolic pressure, heart rate, subjective feeling, and any additional health notes. Provides JSON serialization and object copying functionality.
Note: previously 'BPRecord' was used as the class name, but 'BPObservation' is more accurate as it represents a single observation rather than a collection of records.
Constructors
- BPObservation({required DateTime timestamp, required double systolic, required double diastolic, required double heartRate, required String feeling, required String notes})
-
BPObservation.fromJson(Map<
String, dynamic> json) -
Creates a BPObservation from JSON data.
factory
Properties
- diastolic → double
-
Diastolic blood pressure in mmHg (lower number).
final
- feeling → String
-
Subjective feeling (Excellent/Good/Fair/Poor).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartRate → double
-
Heart rate in beats per minute (BPM).
final
- notes → String
-
Additional health notes or observations.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- systolic → double
-
Systolic blood pressure in mmHg (upper number).
final
- timestamp → DateTime
-
When the measurement was taken.
final
Methods
-
copyWith(
{DateTime? timestamp, double? systolic, double? diastolic, double? heartRate, String? feeling, String? notes}) → BPObservation - Creates a copy of this observation with optionally updated fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts observation to JSON format matching survey response structure.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited