empty method
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;
}
Returns true if the stack contains no elements.
Example:
final stack = LinkedStack<String>();
print(stack.empty()); // true
stack.push('item');
print(stack.empty()); // false
bool empty() {
return _top == null;
}