Capgo Flash __CAPGO_KEEP_0__ 저장소
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
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.
설치하기
설치 제목Capgo의 AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins그런 다음 다음 프롬프트를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-flash` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르면 된다.
bun add @capgo/capacitor-flashbunx cap syncImport
Import 섹션import { CapacitorFlash } from '@capgo/capacitor-flash';API 개요
API 개요 섹션isAvailable
isAvailable 섹션장치에서 플래시등이 사용 가능한지 확인한다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isAvailable();if (value) { console.log('Flashlight is available');}switchOn
스위치 온등불을 켭니다.
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
스위치 오프등불을 끕니다.
import { CapacitorFlash } from '@capgo/capacitor-flash';
await CapacitorFlash.switchOff();isSwitchedOn
등불이 켜져 있는지 확인합니다.클립보드 복사
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.isSwitchedOn();console.log('Flashlight is on:', value);toggle
클립보드 복사__CAPGO_KEEP_0__
import { CapacitorFlash } from '@capgo/capacitor-flash';
const { value } = await CapacitorFlash.toggle();console.log('Flashlight toggled, now on:', value);실제 데이터의 원천
실제 데이터의 원천 섹션이 페이지는 플러그인의 src/definitions.ts공개 API이 업스트림에서 변경될 때 다시 싱크를 실행하십시오.
Getting Started에서 계속
Getting Started에서 계속 섹션이 플러그인을 사용하는 경우 Getting Started 계획 대시보드 및 API 작업을 위해 Getting Started을 사용하는 경우 Using @capgo/capacitor-flash Using @capgo/capacitor-flash 플러그인을 사용하여 API 개요 implementation 세부 정보를 위한 API 개요 소개 implementation 세부 정보를 위한 소개 API 키 implementation 세부 정보를 위한 API 키, 그리고 장치 implementation 세부 정보를 위한 장치