empty method
Returns true if the stack contains no elements.
Example:
final stack = Stack<String>();
print(stack.empty()); // true
stack.push('item');
print(stack.empty()); // false
Implementation
bool empty() {
return _elements.isEmpty;
}
Returns true if the stack contains no elements.
Example:
final stack = Stack<String>();
print(stack.empty()); // true
stack.push('item');
print(stack.empty()); // false
bool empty() {
return _elements.isEmpty;
}