view method

void view()

print stack

Implementation

void view() {
  for (var item in List<T>.from(_stack).reversed) {
    print(item);
  }
}