pop method

Option<T> pop()

Removes the last element from the Vec and returns it, or None if it is empty.

Implementation

@pragma('vm:prefer-inline')
Option<T> pop() {
  if (isEmpty) {
    return None;
  }
  return Some(removeLast());
}