void clear()

This operation is not supported by an unmodifiable map.

Source

void clear() {
  throw new UnsupportedError("Cannot modify unmodifiable map");
}