fromEntity static method

Future<FeedFrontModel?> fromEntity(
  1. String documentID,
  2. FeedFrontEntity? entity
)

Implementation

static Future<FeedFrontModel?> fromEntity(
    String documentID, FeedFrontEntity? entity) async {
  if (entity == null) return null;
  return FeedFrontModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    backgroundOverridePosts:
        await BackgroundModel.fromEntity(entity.backgroundOverridePosts),
    backgroundOverrideProfile:
        await BackgroundModel.fromEntity(entity.backgroundOverrideProfile),
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}