displayToast function

void displayToast({
  1. required String message,
  2. ToastAppearanceType? appearanceType,
  3. String? actionButtonTitle1,
  4. Function? actionButtonCallback1,
  5. String? actionButtonTitle2,
  6. Function? actionButtonCallback2,
  7. Duration? toastDuration,
})

Implementation

void displayToast(
    {required String message,
    ToastAppearanceType? appearanceType,
    String? actionButtonTitle1,
    Function? actionButtonCallback1,
    String? actionButtonTitle2,
    Function? actionButtonCallback2,
    Duration? toastDuration}) {
  showToastWidget(
    ToastWidget(
      message: message,
      appearanceType: appearanceType,
      actionButtonTitle1: actionButtonTitle1,
      actionButtonCallback1: actionButtonCallback1,
      actionButtonTitle2: actionButtonTitle2,
      actionButtonCallback2: actionButtonCallback2,
    ),
    duration: toastDuration,
  );
}