torchx 1.0.5 torchx: ^1.0.5 copied to clipboard
Provides a simple and unified way to control the flashlight on both Android and iOS devices.
torchx #
TorchX flutter library #
#torch #flash #flashlight #lantern #torchlight
Getting Started #
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
π§ version #
Android | iOS | |
---|---|---|
Support | SDK 23+πΌ LolliPopπ |
iOS 10+πΌ |
π± torch level(strength) measure tip #
os | type | min | max |
---|---|---|---|
Android | integer |
1 |
5 |
iOS | float |
0.1 |
1.0 |
π usage #
Flash ON π
Torch.instance.flashOn();
measure torch level and flashOn π
double torchLevel = 0.5;
Torch.instance.flashOnLevel(strengthLevel: level);
Flash OFF π
Torch.instance.flashOff();
Flash On/Off state π/π
await Torch.instance.isTorched;
set/get torch strength level π
double torchLevel = 0.5;
// set
Torch.instance.setLevel(strengthLevel: torchLevel);
// get
torchLevel = await Torch.instance.getLevel();