Stack<T> constructor
Stack<T> ({
- required T value,
- Stack<
T> ? prev,
Creates a stack node with the given value and previous node.
Parameters:
value: The value stored in this stack nodeprev: The previous node in the stack
Example:
final node = Stack(value: 1);
Implementation
Stack({required this.value, this.prev});