Skip to content

@capgo/capacitor-flash

Capacitor Flash Plugin for controlling device flashlight/torch.

Capacitor Flash Plugin for controlling device flashlight/torch.

  • 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.
MethodDescription
isAvailableChecks if flashlight is available on the device.
switchOnTurns the flashlight on.
switchOffTurns the flashlight off.
isSwitchedOnChecks if the flashlight is currently turned on or off.
toggleToggle the flashlight on or off.
getPluginVersionGet the native Capacitor plugin version.

This reference is synced from src/definitions.ts in capacitor-flash.