fromMap static method
Implementation
static FeedFrontEntity? fromMap(Object? o,
{Map<String, String>? newDocumentIds}) {
if (o == null) return null;
var map = o as Map<String, dynamic>;
var backgroundOverridePostsFromMap = map['backgroundOverridePosts'];
if (backgroundOverridePostsFromMap != null) {
backgroundOverridePostsFromMap = BackgroundEntity.fromMap(
backgroundOverridePostsFromMap,
newDocumentIds: newDocumentIds);
}
var backgroundOverrideProfileFromMap = map['backgroundOverrideProfile'];
if (backgroundOverrideProfileFromMap != null) {
backgroundOverrideProfileFromMap = BackgroundEntity.fromMap(
backgroundOverrideProfileFromMap,
newDocumentIds: newDocumentIds);
}
var conditionsFromMap = map['conditions'];
if (conditionsFromMap != null) {
conditionsFromMap = StorageConditionsEntity.fromMap(conditionsFromMap,
newDocumentIds: newDocumentIds);
}
return FeedFrontEntity(
appId: map['appId'],
description: map['description'],
feedId: map['feedId'],
backgroundOverridePosts: backgroundOverridePostsFromMap,
backgroundOverrideProfile: backgroundOverrideProfileFromMap,
conditions: conditionsFromMap,
);
}