__CAPGO_KEEP_3__
__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-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.
インストール
「インストール」のセクション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 nativeプラグインの作業を計画する場合、 Capgo プラグインディレクトリ for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_0__ プラグイン __CAPGO_KEEP_1__ によって Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフローについて、 Capgo ネイティブ ビルド Capgo ネイティブ ビルドの製品ワークフローについて、