lastKey method Null safety

K? lastKey ()

Get the last key in the map. Returns null if the map is empty.

Implementation

K? lastKey() {
  if (_root == null) return null;
  return _last!.key;
}