lastKey method

K? lastKey()

The last key in the map.

Returns null if the map is empty.

Implementation

K? lastKey() {
  final root = _root;
  if (root == null) return null;
  return (_root = _splayMax(root)).key;
}