Saltar al contenido

Inicio

Ventana de terminal
npm install @capgo/capacitor-pretty-toast
npx cap sync
import { toast } from '@capgo/capacitor-pretty-toast';
toast.success('Saved', {
message: 'Your changes are ready.',
});
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);
await toast.promise(uploadFile(), {
loading: {
title: 'Uploading',
message: 'Keep the app open while the file is sent.',
},
success: 'Uploaded',
error: 'Upload failed',
});

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á utilizando

Getting 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.