lastKey method Null safety

K? lastKey ()

The last key in the map.

Returns null if the map is empty.

Implementation

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