# fromMap method Null safety

DecoratedContentEntity? fromMap(

1. Object? o,
2. {Map<String, String>? newDocumentIds}

)

## Implementation

    static DecoratedContentEntity? fromMap(Object? o,
        {Map<String, String>? newDocumentIds}) {
      if (o == null) return null;
      var map = o as Map<String, dynamic>;

      var conditionsFromMap = map['conditions'];
      if (conditionsFromMap != null) {
        conditionsFromMap = StorageConditionsEntity.fromMap(conditionsFromMap,
            newDocumentIds: newDocumentIds);
      }

      return DecoratedContentEntity(
        appId: map['appId'],
        description: map['description'],
        decoratingComponentName: map['decoratingComponentName'],
        decoratingComponentId: map['decoratingComponentId'],
        contentComponentName: map['contentComponentName'],
        contentComponentId: map['contentComponentId'],
        decorationComponentPosition: map['decorationComponentPosition'],
        percentageDecorationVisible:
            double.tryParse(map['percentageDecorationVisible'].toString()),
        conditions: conditionsFromMap,
      );
    }