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 セットアップを使用してプラグインをインストールできます。次のコマンドを使用して、CapgoスキルをAIツールに追加します。
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 セットアップを使用する場合は、次のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
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.',});使用 iconSource URIのような画像の場合に使用します。 これは https://, http://, file://, data:, blob:絶対ファイルパス、または { uri }.
toast.show({ title: 'Profile updated', message: 'Your avatar changed.', iconSource: 'https://example.com/avatar.png',});iconSource が優先されます。 icon.
Getting Startedから続けてください
タイトル:Getting Startedから続けてくださいCapacitorを使用して Getting Started でネイティブプラグインの作業を計画している場合、__CAPGO_KEEP_0__ プラグインディレクトリと接続してください If you are using Getting Started to plan native plugin work, connect it with Capgo Plugin Directory 製品ワークフローについての情報は、Capgo プラグインディレクトリで確認できます。 Capacitor プラグインは、Capgo によって提供されています。 実装の詳細についての情報は、Capacitor プラグインの Capgo で確認できます。 プラグインの追加または更新 実装の詳細についての情報は、プラグインの追加または更新で確認できます。 Ionic Enterprise プラグインの代替 製品ワークフローについての情報は、Ionic Enterprise プラグインの代替で確認できます。 Capgo ネイティブビルド 製品ワークフローについての情報は、Capgo ネイティブビルドで確認できます。