fromEntity static method

Future<MemberHasChatModel?> fromEntity(
  1. String documentID,
  2. MemberHasChatEntity? entity
)

Implementation

static Future<MemberHasChatModel?> fromEntity(
    String documentID, MemberHasChatEntity? entity) async {
  if (entity == null) return null;
  return MemberHasChatModel(
    documentID: documentID,
    memberId: entity.memberId ?? '',
    appId: entity.appId ?? '',
    hasUnread: entity.hasUnread,
  );
}