toEntity method

  1. @override
SectionEntity toEntity({
  1. String? appId,
})
override

Implementation

@override
SectionEntity toEntity({String? appId}) {
  return SectionEntity(
    title: (title != null) ? title : null,
    description: (description != null) ? description : null,
    imageId: (image != null) ? image!.documentID : null,
    imagePositionRelative:
        (imagePositionRelative != null) ? imagePositionRelative!.index : null,
    imageAlignment: (imageAlignment != null) ? imageAlignment!.index : null,
    imageWidth: (imageWidth != null) ? imageWidth : null,
    links: (links != null)
        ? links!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
  );
}