Getting Started
설치 단계와 이 플러그인에 대한 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하십시오.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-flash`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/flash/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치란 제목bun add @capgo/capacitor-flashbunx cap sync수입
수입란 제목import { CapacitorFlash } from '@capgo/capacitor-flash';API 소개
API 소개 제목isAvailable
__CAPGO_KEEP_0__ 제목__CAPGO_KEEP_0__가 장치에 있는 플래시라이트가 있는지 확인합니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isAvailable();if (value) { console.log('Flashlight is available');}switchOn
__CAPGO_KEEP_0__ 제목플래시라이트를 켭니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
// Turn on at full brightnessawait CapacitorFlash.switchOn({ intensity: 1.0 });
// Turn on at half brightnessawait CapacitorFlash.switchOn({ intensity: 0.5 });switchOff
__CAPGO_KEEP_0__ 제목플래시라이트를 끕니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
await CapacitorFlash.switchOff();isSwitchedOn
isSwitchedOn 섹션 제목flashlight가 현재 켜져 있는지 여부를 확인합니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isSwitchedOn();console.log('Flashlight is on:', value);toggle
toggle 섹션 제목flashlight를 켜거나 끕니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.toggle();console.log('Flashlight toggled, now on:', value);Source Of Truth 섹션 제목
이 페이지는 플러그인의. upstream에서 변경된 public __CAPGO_KEEP_0__를 다시 동기화할 때입니다. src/definitions.ts. Re-run the sync when the public API changes upstream.
Getting Started에서 계속하기 섹션 제목
]}만약에 __CAPGO_KEEP_0__을 사용하고 있다면 Getting Started API과 연동하여 대시보드 및 API 작업을 계획하세요. Using @capgo/capacitor-flash Using @capgo/capacitor-flash API Overview API Overview Introduction Introduction API Keys API Keys Devices __CAPGO_KEEP_0__ 구현 세부 사항.