A flutter plugin wrote to control
torch/flash of the device.
torch_controller: ^2.0.1to your pubspec.yaml
To use this package, some steps are required. Please follow the instructions below:
- Now, to use the package, just initiate the controller like:
/// Returns a singleton with the controller that you had initialized /// on `main.dart` final torchController = TorchController();
- To toggle (on/off) torch, just call:
/// This will toggle lights and return the current state bool active = torchController.toggle();
- You can check more specific docs right on methods documentation
Made with contributors-img.