add abstract method

void add(
  1. Toast toast
)

add a toast.

example:

toaster.of(context).add(Toast(
  duration: Duration(seconds: 45), //explicitly say 'null' if you want the toast to never expire.
  message: 'Im a message',
  action: ToastAction(
          action: () => print('clicked on action'),
            actionText: 'Click me'),
  onDissmiss: () => "Ive been dismissed; the action was not performed",
  type: errorToast)
).

Implementation

void add(Toast toast);