toEntity method Null safety

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

Implementation

@override
BookletEntity toEntity({String? appId}) {
  return BookletEntity(
    appId: appId,
    description: (description != null) ? description : null,
    sections: (sections != null)
        ? sections!.map((item) => item.toEntity(appId: appId)).toList()
        : null,
    conditions:
        (conditions != null) ? conditions!.toEntity(appId: appId) : null,
  );
}