switchAppId method

  1. @override
BookletEntity switchAppId({
  1. required String newAppId,
})
override

Implementation

@override
BookletEntity switchAppId({required String newAppId}) {
  var newEntity = copyWith(appId: newAppId);
  newEntity = newEntity.copyWith(
      sections: (sections == null)
          ? null
          : (sections!.map((section) => section.copyWith(
              links: (section.links == null)
                  ? null
                  : (section.links!.map((link) => (link.copyWith(
                          action: link.action == null
                              ? null
                              : link.action!.copyWith(appId: newAppId)))))
                      .toList()))).toList());
  return newEntity;
}