LightOn class

Represents the on/off state of the light.

Constructors

LightOn.new({required bool isOn})
Creates a LightOn object.
LightOn.empty()
Creates an empty LightOn object.
LightOn.fromJson(Map<String, dynamic> dataMap)
Creates a LightOn object from the JSON response to a GET request.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
hasUpdate bool
Whether or not this object has been updated.
no setter
isOn bool
Whether or not the light is on.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? isOn, bool copyOriginalValues = true}) LightOn
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