torchx 0.0.5 copy "torchx: ^0.0.5" to clipboard
torchx: ^0.0.5 copied to clipboard

control all about torch(flashlight). on/off and measure torch levels

torchx #

Pub Version

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 23 (LolliPop) =< 🔼
IOS 10 <= 🔼


add #

flutter pub add torchx

import #

import 'package:torchx/torchx.dart'

usage #

Flash ON

Torch.instance.flashOn();

measure torch level

double torchLevel = 0.5;

Torch.instance.flashOnLevel(strength: torchLevel);

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();


LICENSE #

MIT License

Copyright (c) 2024 neander of donguran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6
likes
0
pub points
33%
popularity

Publisher

verified publisherdonguran.com

control all about torch(flashlight). on/off and measure torch levels

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on torchx