@capgo/capacitor-flash
Capacitor Flash Plugin for controlling device flashlight/torch.
Overview
Section titled “Overview”Capacitor Flash Plugin for controlling device flashlight/torch.
Core Capabilities
Section titled “Core Capabilities”isAvailable- Checks if flashlight is available on the device.switchOn- Turns the flashlight on.switchOff- Turns the flashlight off.isSwitchedOn- Checks if the flashlight is currently turned on or off.
Public API
Section titled “Public API”| Method | Description |
|---|---|
isAvailable | Checks if flashlight is available on the device. |
switchOn | Turns the flashlight on. |
switchOff | Turns the flashlight off. |
isSwitchedOn | Checks if the flashlight is currently turned on or off. |
toggle | Toggle the flashlight on or off. |
getPluginVersion | Get the native Capacitor plugin version. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-flash.