LightGradient class

Represents the current gradient of a light.

Implementers

Constructors

LightGradient({required List<LightColorXy> points, required String mode, required List<String> modeValues})
Creates a LightGradient object.
LightGradient.empty()
Creates an empty LightGradient object.
LightGradient.fromJson(Map<String, dynamic> dataMap)
Creates a LightGradient object from the JSON response to a GET request.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
mode String
Mode in which the points are currently being deployed.
getter/setter pair
modeValues List<String>
Modes a gradient device can deploy the gradient palette of colors.
final
originalMode String
The value of mode when this object was instantiated.
no setter
originalPoints List<LightColorXy>
The value of points when this object was instantiated.
no setter
points List<LightColorXy>
Collection of gradients points.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPoint(LightColorXy point) bool
Adds a point to the points array.
copyWith({List<LightColorXy>? points, String? mode, List<String>? modeValues, bool copyOriginalValues = true}) LightGradient
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.
removePoint(LightColorXy point) bool
Removes a point from the points array.
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