toggleLight method

Future<void> toggleLight()

toggle light when light is turning on, then turn off light vice versa.

Implementation

Future<void> toggleLight() async {
  try {
    await channel?.invokeMethod('toggleLight');
  } on PlatformException catch (e) {
    throw CodeScannerException(e.code, e.message);
  }
}