consumeMessage method

void consumeMessage()

If the NotificationMessage queue is not empty, call the next NotificationMessage.

This method calls all MessageHandlerMiddleware registred in the queue.

Implementation

void consumeMessage() {
  if (!hasMessageShowing) {
    final currentNotification = notifications.first;
    callMiddlewares(
      level: currentNotification.level,
      message: currentNotification.content,
    );
    notifyListeners();
  }
}