removeLast method Null safety
override
Pops and returns the last object in this list.
The list must not be empty.
Throws an UnsupportedError if this is a fixed-length list.
Implementation
E removeLast() {
throw new UnsupportedError("Cannot remove from immutable List.");
}