Skip to contents

Methods


Method new()

Usage

Toaster$new(
  toasterId = incrementToasterId(),
  session = shiny::getDefaultReactiveDomain(),
  ...
)

Arguments

toasterId

Unique number - needed to use more than one toaster

session

Shiny session object

...

Parameters passed to Toaster component

Returns

A new Toaster instance.


Method show()

Shows a new toast to the user, or updates an existing toast corresponding to the provided key

Usage

Toaster$show(..., key = NULL)

Arguments

...

Parameters passed to Toaster component

key

A key of toast to be shown/dismissed

Returns

Nothing. This method is called for side effects.


Method clear()

Dismiss all toasts instantly

Usage

Toaster$clear()

Returns

Nothing. This method is called for side effects.


Method dismiss()

Dismiss the given toast instantly

Usage

Toaster$dismiss(key)

Arguments

key

A key of toast to be shown/dismissed

Returns

Nothing. This method is called for side effects.