[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-pretty-toast`
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/pretty-toast/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.
インストール
「インストール」のセクション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-pretty-toast` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行してください。プラットフォーム固有の指示に従ってください。
npm install @capgo/capacitor-pretty-toastnpx cap syncインポート
「インポート」のセクションimport { toast } from '@capgo/capacitor-pretty-toast';トーストを表示
「トーストを表示」のセクションtoast.success('Saved', { message: 'Your changes are ready.',});ローディングトーストを更新
「ローディングトーストを更新」のセクションconst id = toast.loading('Uploading', { message: 'Waiting for the server response.',});
setTimeout(() => { toast.update(id, { title: 'Upload complete', message: 'The file was stored successfully.', icon: 'checkmark.circle.fill', autoDismiss: true, });}, 1500);Promiseを追跡
「Promiseを追跡」のセクションawait toast.promise(uploadFile(), { loading: { title: 'Uploading', message: 'Keep the app open while the file is sent.', }, success: 'Uploaded', error: 'Upload failed',});アイコンと画像
「アイコンと画像」のセクション使用 icon シンボル名またはraw SVGマークアップの場合:
toast.info('New message', { icon: 'message.fill', message: 'Open the inbox to reply.',});URIのような画像の場合。絶対ファイルパスや iconSource クリップボードにコピー https://, http://, file://, data:, blob:が優先されます。 { uri }.
toast.show({ title: 'Profile updated', message: 'Your avatar changed.', iconSource: 'https://example.com/avatar.png',});iconSource 「Getting Started」から続けてください」というセクション icon.
Capacitorを使用している場合
「Getting Started」から続けてくださいSection titled “Keep going from Getting Started” 「Getting Started」から続けてください ネイティブ プラグイン作業を計画するには、{0}に接続してください。 Capgo プラグイン ディレクトリ for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 {0}の実装詳細については、プラグインの追加または更新をご覧ください。 Ionic Enterprise プラグインの代替 {0}の製品ワークフローについては、Ionic Enterprise プラグインの代替と{0}のネイティブ ビルドをご覧ください。 Capgo Native Builds for the product workflow in Capgo Native Builds.