Bridge class

Represents a Philips Hue bridge device.

Inheritance
Available extensions

Constructors

Bridge({required ResourceType type, required String id, String idV1 = '', String? applicationKey, String? clientKey, String? ipAddress, required Relative owner, required String bridgeId, required String timeZone})
Creates a Bridge object.
Bridge.empty()
Creates an empty Bridge object.
Bridge.fromJson(Map<String, dynamic> dataMap)
Creates a Bridge object from the JSON response to a GET request.
factory

Properties

applicationKey → String?
The secret key that is used to talk with the bridge.
final
bridge ↔ Bridge?
The bridge that this resource is associated with.
getter/setter pairinherited
bridgeId → String
Unique identifier of this bridge as printed on the device.
final
clientKey → String?
The secret key that is used to streaming to the bridge.
final
hashCode → int
The hash code for this object.
no setteroverride
hasUpdate → bool
Whether or not this object has been updated.
no setterinherited
hueNetwork ↔ HueNetwork?
The HueNetwork that this resource is associated with.
getter/setter pairinherited
id → String
Unique identifier representing a specific resource instance.
finalinherited
idV1 → String
Clip v1 resource identifier.
final
ipAddress → String?
The internal IP address of this bridge.
final
originalType → ResourceType
no setterinherited
owner → Relative
Owner of this bridge, in case the owner is deleted, this also gets deleted.
final
ownerAsResource → Resource
Returns a Resource object that represents the owner of this Resource.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeZone → String
Time zone where this bridge is located (as Olson ID).
final
type ↔ ResourceType
Type of the supported resource.
getter/setter pairinherited

Methods

copyWith({ResourceType? type, String? id, String? idV1, String? applicationKey = '', String? clientKey = '', String? ipAddress = '', Relative? owner, String? bridgeId, String? timeZone, bool copyOriginalValues = true}) → Bridge
Returns a copy of this object with its field values replaced by the ones provided to this method.
delete(Resource resource, {String decrypter(String ciphertext)?}) → Future<Map<String, dynamic>?>

Available on Bridge, provided by the HttpRequests extension

Fetch the given resource from this bridge.
get(Resource resource, {String decrypter(String ciphertext)?}) → Future<Map<String, dynamic>?>

Available on Bridge, provided by the HttpRequests extension

Fetch the given resource from this bridge.
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
getResource(ResourceType type, {String decrypter(String ciphertext)?}) → Future<List<Map<String, dynamic>>?>

Available on Bridge, provided by the HttpRequests extension

Fetch all resources of the given resource type from this bridge.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(Resource resource, {String decrypter(String ciphertext)?, bool refreshOriginals = true}) → Future<Map<String, dynamic>?>

Available on Bridge, provided by the HttpRequests extension

Fetch the given resource from this bridge.
put(Resource resource, {String decrypter(String ciphertext)?, bool refreshOriginals = true}) → Future<Map<String, dynamic>?>

Available on Bridge, provided by the HttpRequests extension

Fetch the given resource from this bridge.
refreshOriginals() → void
Called after a successful PUT request, this method refreshed the "original" data in this object.
inherited
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