fromEntityPlus static method

Future<FeedModel?> fromEntityPlus(
  1. String documentID,
  2. FeedEntity? entity, {
  3. String? appId,
})

Implementation

static Future<FeedModel?> fromEntityPlus(
    String documentID, FeedEntity? entity,
    {String? appId}) 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,
  );
}