Command.toggle constructor

Command.toggle({
  1. int? id,
})

Command to toggle the device (main light).

This method is defined because sometimes user may just want to flip the state without knowing the current state.

Implementation

Command.toggle({this.id})
    : method = CommandMethods.toggle,
      parameters = const <void>[];