torch_controller 0.1.4 copy "torch_controller: ^0.1.4" to clipboard
torch_controller: ^0.1.4 copied to clipboard

outdated

A new flutter plugin project.

[opensource_qwkin_image]

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

Disclaimer #

  • For now, the package is only available for iOS. Android version will be released until 1.0.0 version

Installing #

  • Add torch_controller: 0.1.2 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();
  • 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

Authors #

25
likes
0
points
2.81k
downloads

Publisher

unverified uploader

Weekly Downloads

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on torch_controller