Getting Started
Kopieren Sie eine Einrichtungsanleitung mit den Installationsanweisungen und der vollständigen Markdown-Guideline für diesen Plugin.
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.
Installieren
Abschnitt mit dem Titel „Installieren“npm install @capgo/capacitor-pretty-toastnpx cap syncImportieren
Abschnitt mit dem Titel „Importieren“import { toast } from '@capgo/capacitor-pretty-toast';Toast anzeigen
Abschnitt mit dem Titel „Toast anzeigen“toast.success('Saved', { message: 'Your changes are ready.',});Ein Update für einen laufenden Toast anfordern
Abschnitt: Ein Update für einen laufenden Toast anfordernconst 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);Einen Versprechen verfolgen
Abschnitt: Einen Versprechen verfolgenawait toast.promise(uploadFile(), { loading: { title: 'Uploading', message: 'Keep the app open while the file is sent.', }, success: 'Uploaded', error: 'Upload failed',});Symbole und Bilder
Abschnitt: Symbole und BilderVerwenden icon für einen Symbolnamen oder rohe SVG-Markup:
toast.info('New message', { icon: 'message.fill', message: 'Open the inbox to reply.',});Verwenden Sie iconSource für URI-artige Bilder. Es unterstützt https://, http://, file://, data:, blob:, absolute Dateipfade oder { uri }.
toast.show({ title: 'Profile updated', message: 'Your avatar changed.', iconSource: 'https://example.com/avatar.png',});iconSource hat Vorrang vor icon.
Fortsetzen von Getting Started
Abschnitt mit dem Titel “Fortsetzen von Getting Started”Wenn Sie native Plugin-Arbeiten mit Getting Started planen, verbinden Sie es mit Capgo Plugin-Verzeichnis für den Produktworkflow in Capgo Plugin-Verzeichnis, Capacitor Plugins durch Capgo für die Implementierungsdetails in Capacitor Plugins durch Capgo, Plugins hinzufügen oder aktualisieren für die Implementierungsdetails in Plugins hinzufügen oder aktualisieren, Alternativen zu Ionic Enterprise Plugins für den Produktworkflow in Alternativen zu Ionic Enterprise Plugins, und Capgo Native Builds für den Produktworkflow in Capgo Native Builds.