canUnpackIntoHelper function Null safety

bool canUnpackIntoHelper(
  1. GeneratedMessage instance,
  2. String typeUrl
)

Returns true if the type of instance is described by typeUrl.

This is a helper method for Any.canUnpackInto.

Implementation

bool canUnpackIntoHelper(GeneratedMessage instance, String typeUrl) {
  return instance.info_.qualifiedMessageName == _typeNameFromUrl(typeUrl);
}