createTutorial static method
Implementation
static Future<PageModel> createTutorial(
String appId,
String tutorialID,
String title,
String description,
DrawerModel? drawer,
AppBarModel appBar,
HomeMenuModel? homeMenu) async {
List<BodyComponentModel> components = [];
components.add(BodyComponentModel(
documentID: "1",
componentName: AbstractTutorialComponent.componentName,
componentId: tutorialID));
PageModel page = PageModel(
documentID: tutorialID,
appId: appId,
title: title,
description: description,
appBar: appBar,
drawer: drawer,
homeMenu: homeMenu,
bodyComponents: components,
layout: PageLayout.onlyTheFirstComponent,
conditions: StorageConditionsModel(
privilegeLevelRequired:
PrivilegeLevelRequiredSimple.noPrivilegeRequiredSimple,
),
);
return await AbstractRepositorySingleton.singleton
.pageRepository(appId)!
.add(page);
}