Getting Started
Copia 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.
Instala
Sección titulada “Instalar”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 el siguiente prompt:
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 complemento ejecutando los siguientes comandos y siga 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 bruto:
toast.info('New message', { icon: 'message.fill', message: 'Open the inbox to reply.',});Usar 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.
Sigue adelante desde Inicio
Título de sección “Sigue adelante desde Inicio”Si estás utilizando Getting Started para planificar el trabajo de plugin nativo, conectalo con Capgo Carpeta del plugin para el flujo de trabajo del producto en Capgo Carpeta del plugin, 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 Ionic Enterprise Plugin Alternatives, y Capgo Compilaciones Nativas para el flujo de trabajo del producto en Capgo Compilaciones Nativas.