# fromEntity method Null safety

dynamic fromEntity(

1. String documentID,
2. ListedItemEntity? entity

)

## Implementation

    static Future<ListedItemModel?> fromEntity(
        String documentID, ListedItemEntity? entity) async {
      if (entity == null) return null;
      return ListedItemModel(
        documentID: documentID,
        description: entity.description,
        action: await ActionModel.fromEntity(entity.action),
        posSize: await PosSizeModel.fromEntity(entity.posSize),
      );
    }