How to add toast action button?

Hi,

I found this solution on stackoverflow.
(http://stackoverflow.com/a/37459115/7439224)

toast.onDidDismiss((data, role) => {
  console.log('Dismissed toast');
  if (role == "close") {
    this.undoFunction();
  }
});

That worked great without time stopping.

23 Likes