getCreateTasks method

  1. @override
List<NewAppTask>? getCreateTasks(
  1. String uniqueId,
  2. AppModel app,
  3. NewAppWizardParameters parameters,
  4. MemberModel member,
  5. HomeMenuProvider homeMenuProvider,
  6. AppBarProvider appBarProvider,
  7. DrawerProvider leftDrawerProvider,
  8. DrawerProvider rightDrawerProvider,
)
override

Implementation

@override
List<NewAppTask>? getCreateTasks(
  String uniqueId,
  AppModel app,
  NewAppWizardParameters parameters,
  MemberModel member,
  HomeMenuProvider homeMenuProvider,
  AppBarProvider appBarProvider,
  DrawerProvider leftDrawerProvider,
  DrawerProvider rightDrawerProvider,
) {
  if (parameters is ActionSpecificationParametersBase) {
    var welcomePageSpecifications = parameters.actionSpecifications;
    if (welcomePageSpecifications.shouldCreatePageDialogOrWorkflow()) {
      var memberId = member.documentID;
      List<NewAppTask> tasks = [];
      tasks.add(() async {
        print("Welcome Page");
        await WelcomePageBuilder(
          uniqueId,
          welcomePageId,
          app,
          memberId,
          homeMenuProvider(),
          appBarProvider(),
          leftDrawerProvider(),
          rightDrawerProvider(),
        ).create();
      });
      return tasks;
    }
  } else {
    throw Exception('Unexpected class for parameters: $parameters');
  }
  return null;
}