removeLast method
T
removeLast()
Removes and returns the last element in this set.
Implementation
T removeLast() {
assert(isNotEmpty, 'The set must not be empty.');
final element = last;
remove(last);
return element;
}