fromEntity static method

Future<FeedModel?> fromEntity(
  1. String documentID,
  2. FeedEntity? entity
)

Implementation

static Future<FeedModel?> fromEntity(
    String documentID, FeedEntity? entity) async {
  if (entity == null) return null;
  return FeedModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    thumbImage: toThumbStyle(entity.thumbImage),
    photoPost: entity.photoPost,
    videoPost: entity.videoPost,
    messagePost: entity.messagePost,
    audioPost: entity.audioPost,
    albumPost: entity.albumPost,
    articlePost: entity.articlePost,
  );
}