empty method

bool empty()

Returns true if the stack contains no elements.

Example:

final stack = LinkedStack<String>();
print(stack.empty()); // true
stack.push('item');
print(stack.empty()); // false

Implementation

bool empty() {
  return _top == null;
}