Device class

Equivalent of Device from HealthConnectReporter https://github.com/kvs-coder/HealthConnectReporter

The device that recorded a sample.

Supports map representation.

Has a Device.fromJson constructor to create instances from JSON payload coming from Android native code. And supports multiple object creation by collect method from JSON list.

Mixed-in types

Constructors

Device({DeviceType type = DeviceType.unknown, String? manufacturer, String? model})
const
Device.fromJson(Map<String, dynamic> json)
General constructor from JSON payload

Properties

hashCode → int
The hash code for this object.
no setterinherited
manufacturer → String?
Manufacturer, e.g. Google
final
map → Map<String, dynamic>
General map representation
no setteroverride
model → String?
Model, e.g. Pixel Watch
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → DeviceType
The kind of device. DeviceType.unknown by default
final

Methods

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

Static Methods

collect(List list) → List<Device>
Simplifies creating a list of objects from JSON payload.