fromEntity static method

Future<ChatDashboardModel?> fromEntity(
  1. String documentID,
  2. ChatDashboardEntity? entity
)

Implementation

static Future<ChatDashboardModel?> fromEntity(
    String documentID, ChatDashboardEntity? entity) async {
  if (entity == null) return null;
  return ChatDashboardModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
    membersType: toMembersType(entity.membersType),
  );
}