sendOnOffCommand method

  1. @override
Future<void> sendOnOffCommand(
  1. int address,
  2. bool isOn
)
override

Implementation

@override
Future<void> sendOnOffCommand(int address, bool isOn) async {
  try {
    await methodChannel.invokeMethod<void>('sendOnOffCommand', {
      'address': address,
      'isOn': isOn,
    });
  } on PlatformException catch (e) {
    debugPrint('Failed to send on/off command: ${e.message}');
    rethrow;
  }
}