isValidKey method Null safety

  1. @override
bool isValidKey(
  1. Object? o
)
override

Test whether an object is a valid argument to equals and hash.

Some implementations may be restricted to only work on specific types of objects.

Implementation

@override
bool isValidKey(Object? o) {
  if (o is E) {
    final value = _comparisonKey(o);
    return _inner.isValidKey(value);
  }
  return false;
}