constructor(public toastController: ToastController) {}
async presentToast() {
const toast = await this.toastController.create({
message: 'Your settings have been saved.',
duration: 2000
});
toast.present();
}
showOnceToast() {
this.toastController.dismiss().then((obj) => {
}).catch(() => {
}).finally(() => {
this.showToast();
});
}Copy