toEntity method

BackgroundEntity toEntity({
  1. String? appId,
})

Implementation

BackgroundEntity toEntity({String? appId}) {
  return BackgroundEntity(
    backgroundImageId:
        (backgroundImage != null) ? backgroundImage!.documentID : null,
    useProfilePhotoAsBackground: (useProfilePhotoAsBackground != null)
        ? useProfilePhotoAsBackground
        : null,
    beginGradientPosition:
        (beginGradientPosition != null) ? beginGradientPosition!.index : null,
    endGradientPosition:
        (endGradientPosition != null) ? endGradientPosition!.index : null,
    shadow: (shadow != null) ? shadow!.toEntity(appId: appId) : null,
    decorationColors: (decorationColors != null)
        ? decorationColors!
            .map((item) => item.toEntity(appId: appId))
            .toList()
        : null,
    borderRadius:
        (borderRadius != null) ? borderRadius!.toEntity(appId: appId) : null,
    border: (border != null) ? border : null,
    padding: (padding != null) ? padding!.toEntity(appId: appId) : null,
    margin: (margin != null) ? margin!.toEntity(appId: appId) : null,
  );
}