# contains method

1. @override

bool contains(

1. Object? element

)
override

Returns true if this queue contains the specified element.

## Implementation

    @override
    bool contains(Object? element) {
      var current = _head;
      while (current != null) {
        if (current.data == element) {
          return true;
        }
        current = current.next;
      }
      return false;
    }