peek method

T peek()

Implementation

T peek() {
  if (_stack.isEmpty) {
    throw StateError('Stack is empty');
  }
  return _stack.last;
}