Einstieg
Einen Setup-Befehl mit den Installations-Schritten und der vollständigen Markdown-Anleitung für diesen Plugin kopieren.
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
Terminal-Fensternpm install @capgo/capacitor-pretty-toastnpx cap syncSektion mit dem Titel „Installieren“
Abschnitt mit dem Titel „Importieren“import { toast } from '@capgo/capacitor-pretty-toast';Ein Toast anzeigen
Abschnitt mit dem Titel „Ein Toast anzeigen“toast.success('Saved', { message: 'Your changes are ready.',});Ein laufendes Toast aktualisieren
Abschnitt mit dem Titel „Ein laufendes Toast aktualisieren“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);Eine Promise verfolgen
Abschnitt mit dem Titel „Eine Promise verfolgen“await 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 mit dem Titel “Icons und Bilder”Verwenden Sie icon für einen Symbolnamen oder Roh-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.
Weitermachen von Getting Started
Abschnitt mit dem Titel “Weitermachen von Getting Started”Wenn Sie Zum Starten um native Plugin-Arbeit zu planen, verbinden Sie es mit Capgo Plugin-Verzeichnis für den Produktworkflow in Capgo Plugin-Verzeichnis, Capacitor Plugins von Capgo für die Implementierungsdetails in Capacitor Plugins von Capgo, Hinzufügen oder Aktualisieren von Plugins für die Implementierungsdetails in Hinzufügen oder Aktualisieren von Plugins, Ionic Enterprise Plugin Alternativen für den Produktworkflow in Ionic Enterprise Plugin Alternativen, und Capgo Native Builds für den Produktworkflow in Capgo Native Builds.