toast with capacitor ionic code example
Example 1: ionic toast
constructor(public toastController: ToastController) {}
async presentToast() {
const toast = await this.toastController.create({
message: 'Your settings have been saved.',
duration: 2000
});
toast.present();
}
Example 2: ionic capacitor android
// if you didn't run before
ionic build
// then
npx cap add android
npx cap sync