Device class

Represents a Philips Hue device.

Inheritance

Constructors

Device({required ResourceType type, required String id, String idV1 = "", required DeviceProductData productData, required DeviceMetadata metadata, required List<Relative> services, String? identifyAction})
Creates a Device object.
Device.empty()
Creates an empty Device object.
Device.fromJson(Map<String, dynamic> dataMap)
Creates a Device object from the JSON response to a GET request.
factory

Properties

bridge Bridge?
The bridge that this resource is associated with.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setteroverride
hueNetwork HueNetwork?
The HueNetwork that this resource is associated with.
getter/setter pairinherited
id String
Unique identifier representing a specific resource instance.
finalinherited
identifyAction String?
identify: Triggers a visual identification sequence, current implemented as (which can change in the future):
getter/setter pair
idV1 String
Clip v1 resource identifier.
final
metadata DeviceMetadata
Configuration object for this room.
getter/setter pair
originalType ResourceType
no setterinherited
productData DeviceProductData
Product data about this device.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services List<Relative>
References all services aggregating control and state of children in the group.
final
servicesAsResources List<Resource>
Returns a list of the services as Resource objects.
no setter
type ResourceType
Type of the supported resource.
getter/setter pairinherited

Methods

copyWith({ResourceType? type, String? id, String? idV1, DeviceProductData? productData, DeviceMetadata? metadata, List<Relative>? services, String? identifyAction = "", bool copyOriginalValues = true}) Device
Returns a copy of this object with its field values replaced by the ones provided to this method.
getRelativeAsResource(Relative relative) Resource
Returns a Resource object that represents the relative of this Resource.
inherited
getRelativesAsResources(List<Relative> relatives) List<Resource>
Returns a list of Resource objects that represent the relatives of this Resource.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshOriginals() → void
Called after a successful PUT request, this method refreshed the "original" data in this object.
override
toJson({OptimizeFor optimizeFor = OptimizeFor.put}) Map<String, dynamic>
Converts this object into JSON format.
override
toString() String
A string representation of this object.
override

Operators

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