Inicio
Copie un prompt de configuración con los pasos de instalación y la guía de markdown completa para este 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.
Instalar
Sección titulada “Instalar”npm install @capgo/capacitor-pretty-toastnpx cap syncImportar
Sección titulada “Importar”import { toast } from '@capgo/capacitor-pretty-toast';Mostrar un Toast
Sección titulada “Mostrar un Toast”toast.success('Saved', { message: 'Your changes are ready.',});Actualizar un Toast de carga
Sección titulada “Actualizar un Toast de carga”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);Seguir un Promesa
Sección titulada “Seguir un Promesa”await toast.promise(uploadFile(), { loading: { title: 'Uploading', message: 'Keep the app open while the file is sent.', }, success: 'Uploaded', error: 'Upload failed',});Iconos y imágenes
Sección titulada “Iconos y imágenes”Usar icon para un nombre de símbolo o marcado SVG crudo:
toast.info('New message', { icon: 'message.fill', message: 'Open the inbox to reply.',});Utilice iconSource para imágenes URI similares. Soporta https://, http://, file://, data:, blob:, rutas de archivo absolutas, o { uri }.
toast.show({ title: 'Profile updated', message: 'Your avatar changed.', iconSource: 'https://example.com/avatar.png',});iconSource toma prioridad sobre icon.
Siga adelante desde Getting Started
Si está utilizandoGetting Started para planificar el trabajo de plugin nativo, conecte con __CAPGO_KEEP_0__ Directorio de Plugin para el flujo de trabajo del producto en Capgo Directorio de Plugin, for the product workflow in Capgo Plugin Directory, Capacitor Plugins por Capgo para el detalle de implementación en Capacitor Plugins por Capgo, Agregar o Actualizar Plugins para el detalle de implementación en Agregar o Actualizar Plugins, Alternativas de Plugins de Ionic Enterprise para el flujo de trabajo del producto en Alternativas de Plugins de Ionic Enterprise, y Capgo Compilaciones Nativas para el flujo de trabajo del producto en Capgo Compilaciones Nativas.