Device class

Representation of an integrated device (such as a phone or a wearable) that can hold sensors.

Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - Treat data differently depending on sensor type (accelerometers on a watch may give different patterns than those on a phone) - Build different analysis models for each device/version.

Constructors

Device({String? manufacturer, String? model, String? type, String? uid, String? version})
Device.fromJson(Map json_)

Properties

hashCode int
The hash code for this object.
no setterinherited
manufacturer String?
Manufacturer of the product/hardware.
getter/setter pair
model String?
End-user visible model name for the device.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String?
A constant representing the type of the device. Possible string values are:
getter/setter pair
uid String?
The serial number or other unique ID for the hardware.
getter/setter pair
version String?
Version string for the device hardware/software.
getter/setter pair

Methods

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

Operators

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