showToast static method

Future<ABUSResult> showToast({
  1. required String message,
  2. ToastType type = ToastType.info,
  3. Duration? duration,
  4. Set<String>? tags,
  5. int priority = 0,
  6. bool replace = false,
})

Show a toast

Implementation

static Future<ABUSResult> showToast({
  required String message,
  ToastType type = ToastType.info,
  Duration? duration,
  Set<String>? tags,
  int priority = 0,
  bool replace = false,
}) {
  final event = ToastEvent(
    id: 'toast_${DateTime.now().millisecondsSinceEpoch}',
    message: message,
    type: type,
    duration: duration,
    tags: tags ?? {},
    priority: priority,
  );

  return ABUS
      .execute(ShowFeedbackInteraction(event: event, replace: replace));
}