fromMap static method
Implementation
static DialogEntity? fromMap(Object? o,
{Map<String, String>? newDocumentIds}) {
if (o == null) return null;
var map = o as Map<String, dynamic>;
var bodyComponentsFromMap = map['bodyComponents'];
List<BodyComponentEntity> bodyComponentsList;
if (bodyComponentsFromMap != null) {
bodyComponentsList = (map['bodyComponents'] as List<dynamic>)
.map((dynamic item) => BodyComponentEntity.fromMap(item as Map,
newDocumentIds: newDocumentIds)!)
.toList();
} else {
bodyComponentsList = [];
}
var backgroundOverrideFromMap = map['backgroundOverride'];
if (backgroundOverrideFromMap != null) {
backgroundOverrideFromMap = BackgroundEntity.fromMap(
backgroundOverrideFromMap,
newDocumentIds: newDocumentIds);
}
var conditionsFromMap = map['conditions'];
if (conditionsFromMap != null) {
conditionsFromMap = StorageConditionsEntity.fromMap(conditionsFromMap,
newDocumentIds: newDocumentIds);
}
return DialogEntity(
appId: map['appId'],
title: map['title'],
description: map['description'],
bodyComponents: bodyComponentsList,
backgroundOverride: backgroundOverrideFromMap,
layout: map['layout'],
includeHeading: map['includeHeading'],
gridViewId: map['gridViewId'],
conditions: conditionsFromMap,
);
}