Metadata class

Equivalent of Metadata from HealthKitReporter https://github.com/kvs-coder/HealthKitReporter

A flat JSON object whose values are strings, numbers, booleans, dates as {"timestamp": <seconds since 1970>} and quantities as {"value": <number>, "unit": <unit>}.

Supports map representation, which the native side reads back when saving samples.

Constructors

Metadata(Map<String, MetadataValue> values)
const
Metadata.fromJson(Map<String, dynamic> json)
General constructor from JSON payload

Properties

hashCode → int
The hash code for this object.
no setteroverride
map → Map<String, dynamic>
General map representation
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
values → Map<String, MetadataValue>
final

Methods

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

Operators

operator ==(Object other) → bool
The equality operator.
override
operator [](String key) → MetadataValue?
The value for key, or null

Static Methods

tryFromJson(dynamic json) → Metadata?
Null for a missing metadata object