Light.fromJson constructor

Light.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Light.fromJson(Map<String, dynamic> json) {
  return Light(
    state: LightState.fromJson(json['state']),
    buttons: List<Button>.from((json['buttons'] as Iterable).map((e) => Button.fromJson(e))),
  );
}