enqueue method

void enqueue({
  1. required BuildContext context,
  2. required String title,
  3. String? subtitle,
  4. SnackbarType? type,
  5. Duration? duration,
  6. bool showProgressIndicator = false,
})

Adds a snackbar to the queue

Implementation

void enqueue({
  required BuildContext context,
  required String title,
  String? subtitle,
  SnackbarType? type,
  Duration? duration,
  bool showProgressIndicator = false,
}) {
  _queue.add(
    _QueuedSnackbar(
      context: context,
      title: title,
      subtitle: subtitle,
      type: type,
      duration: duration,
      showProgressIndicator: showProgressIndicator,
    ),
  );
  _processQueue();
}