toggleFlash method

Future<bool?> toggleFlash()

Implementation

Future<bool?> toggleFlash() async {
  openFlashlight = await _controller.setFlashlight();
  setState(() {});
  return openFlashlight;
}