FailedResource class

Represents a resource that failed to be fetched.

Constructors

FailedResource({required ResourceType type, required String id, Bridge? bridge, HueNetwork? hueNetwork, required ErrorType error, String? additionalInfo, Map<String, dynamic>? json})
Creates a new FailedResource instance.
FailedResource.empty()
Creates an empty FailedResource object.

Properties

additionalInfo → String?
Additional information about the error.
final
bridge → Bridge?
The bridge that this resource is associated with.
final
error → ErrorType
The error that occurred.
final
hashCode → int
The hash code for this object.
no setteroverride
hueNetwork → HueNetwork?
The HueNetwork that this resource is associated with.
final
id → String
Unique identifier representing a specific resource instance.
final
isEmpty → bool
Whether or not this object is empty.
no setter
isNotEmpty → bool
Whether or not this object is not empty.
no setter
json → Map<String, dynamic>?
The JSON data that was able to be fetched.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → ResourceType
Type of the supported resource.
final

Methods

copy() → FailedResource
Returns a copy of this object.
copyWith({ResourceType? type, String? id, Object? bridge = sentinelValue, Object? hueNetwork = sentinelValue, ErrorType? error, Object? additionalInfo = sentinelValue, Object? json = sentinelValue}) → FailedResource
Returns a copy of this object with its field values replaced by the ones provided to this method.
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

Constants

sentinelValue → const Object
Used in the copyWith method to check if nullable values are meant to be copied over.