Skip to content

__CAPGO_KEEP_3__

ターミナルウィンドウ
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);

Promiseを追跡

Promiseの追跡
await toast.promise(uploadFile(), {
loading: {
title: 'Uploading',
message: 'Keep the app open while the file is sent.',
},
success: 'Uploaded',
error: 'Upload failed',
});

使用 icon シンボル名またはRAW SVG マークアップのために

toast.info('New message', {
icon: 'message.fill',
message: 'Open the inbox to reply.',
});

使用 iconSource URIのような画像のために。 それが https://, http://, file://, data:, blob:, 絶対ファイルパス、または { uri }.

toast.show({
title: 'Profile updated',
message: 'Your avatar changed.',
iconSource: 'https://example.com/avatar.png',
});

iconSource が優先される icon.

Getting Startedから続ける

Getting Startedから続けるセクション

Capacitorを使用している場合 Getting Started nativeプラグインの作業を計画する場合、 Capgo プラグインディレクトリ for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_0__ プラグイン __CAPGO_KEEP_1__ によって Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフローについて、 Capgo ネイティブ ビルド Capgo ネイティブ ビルドの製品ワークフローについて、