Inicio
Copia una línea de comando 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.
Instalación
Sección titulada “Instalación”Puede utilizar nuestra configuración asistida por IA para instalar el plugin. Agregue las Capgo habilidades a su herramienta de IA utilizando el siguiente comando:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsLuego utilice la siguiente solicitud:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-pretty-toast` plugin in my project.Si prefiere la configuración manual, instale el plugin ejecutando los siguientes comandos y siguiendo las instrucciones específicas de la plataforma a continuación:
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.',});Use iconSource para imágenes URI-like. 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.
Sigue adelante desde Getting Started
Sección titulada “Sigue adelante desde Getting Started”Si estás utilizando Getting Started para planificar el trabajo de plugin nativo, conecta con Capgo Directorio de Plugin para el flujo de trabajo del producto en Capgo Directorio de Plugin, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by 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.