LightColorTemperature class

Represents the current color temperature and the color temperature capabilities of a light.

Constructors

LightColorTemperature({required int? mirek, required bool mirekValid, required LightColorTemperatureMirekSchema mirekSchema})
Creates a LightColorTemperature object.
LightColorTemperature.empty()
Creates an empty LightColorTemperature object.
LightColorTemperature.fromJson(Map<String, dynamic> dataMap)
Creates a LightColorTemperature object from the JSON response to a GET request.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
mirek int?
Color temperature in mirek or null when the light color is not in the ct spectrum.
getter/setter pair
mirekSchema LightColorTemperatureMirekSchema
The color temperature range for the light.
final
mirekValid bool
Whether or not the value presented in _mirek is valid.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? mirek = -1, bool? mirekValid, LightColorTemperatureMirekSchema? mirekSchema, bool copyOriginalValues = true}) LightColorTemperature
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
refreshOriginals() → void
Called after a successful PUT request, this method refreshed the "original" data in this object.
toJson({OptimizeFor optimizeFor = OptimizeFor.put}) Map<String, dynamic>
Converts this object into JSON format.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

isValidMirek(int? mirek) bool
Returns true if mirek is null or if it is in the valid range.