torch_controller

Creator: coderz1093

Last updated:

Add to Cart

Description:

torch controller

torch_controller #
A flutter plugin wrote to control torch/flash of the device.
Installing #

Add torch_controller: ^2.0.1 to your pubspec.yaml

Usage #
To use this package, some steps are required. Please follow the instructions below:

Initialize TorchController by calling TorchController().initialize()
before your runApp on your main.dart file.
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();
copied to clipboard

To toggle (on/off) torch, just call:

/// This will toggle lights and return the current state
bool active = torchController.toggle();
copied to clipboard

You can check more specific docs right on methods documentation

Contributors #



Made with contributors-img.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.