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.
インストール
「インストール」のセクション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.手動セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の説明を参照してください:
npm install @capgo/capacitor-pretty-toastnpx cap syncインポート
セクション「インポート」import { toast } from '@capgo/capacitor-pretty-toast';トーストを表示
Section titled “Toastを表示する”toast.success('Saved', { message: 'Your changes are ready.',});Loading Toastを更新
Section titled “Loading Toastを更新する”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を追跡
Section titled “Promiseを追跡する”await toast.promise(uploadFile(), { loading: { title: 'Uploading', message: 'Keep the app open while the file is sent.', }, success: 'Uploaded', error: 'Upload failed',});アイコンと画像
Section titled “アイコンと画像”Use icon for a symbol name or raw SVG markup:
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 Getting Startedから続けてください icon.
Getting Startedから続けてくださいセクション
Capgoを使用している場合Getting Started を使用してネイティブプラグインの作業を計画している場合、__CAPGO_KEEP_0__ プラグインディレクトリと接続してください. Getting Started Capgo Plugin Directory 製品ワークフローについては、Capgo プラグインディレクトリを参照してください。 Capacitor プラグインは、Capgo によって提供されています。 実装詳細については、Capacitor プラグインの Capgo を参照してください。 プラグインの追加または更新 実装詳細については、プラグインの追加または更新を参照してください。 Ionic Enterprise プラグインの代替 製品ワークフローについては、Ionic Enterprise プラグインの代替を参照してください。 Capgo ネイティブビルド 製品ワークフローについては、Capgo ネイティブビルドを参照してください。