isWaitingFor method Null safety

bool isWaitingFor(
  1. Object? flag,
  2. {Object? ref}
)

Implementation

bool isWaitingFor(Object? flag, {Object? ref}) {
  Set? refs = _flags[flag];

  if (ref == null)
    return refs != null && refs.isNotEmpty;
  else
    return refs != null && refs.contains(ref);
}