Package Exports
- react-native-torch
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-torch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-torch
A simple React Native plugin to switch a flashlight on/off.
Currently supports both iOS (>= 8.0) and Android (>= 6.0 Marshmallow) platforms.
Install
npm install --save react-native-torch
react-native link react-native-torchUsage
import Torch from 'react-native-torch';
Torch.switchState(true) // Turn ON
Torch.switchState(false) // Turn OFFA demo application TorchDemo is also available.