isFlashlightOn method

  1. @override
Future<bool> isFlashlightOn()

Check if the flashlight is on.
Return true if the flashlight is on. Otherwise, this function returns false.

Implementation

@override
Future<bool> isFlashlightOn() async {
  return await methodChannel
      .invokeMethod<bool>('isFlashlightOn')
      .then<bool>((bool? value) => value ?? false);
}