isDeclarationRecord function

bool isDeclarationRecord(
  1. Map<String, dynamic>? object
)

Returns true if object is DeclarationRecord, otherwise false.

Implementation

bool isDeclarationRecord(final Map<String, dynamic>? object) {
  if (object == null) return false;
  if (object[r'$type'] == null) return false;

  return object[r'$type'] == 'chat.bsky.actor.declaration#main' ||
      object[r'$type'] == 'chat.bsky.actor.declaration';
}