getCreateTasks method
List<NewAppTask> ?
getCreateTasks(
- String uniqueId,
- AppModel app,
- NewAppWizardParameters parameters,
- MemberModel member,
- HomeMenuProvider homeMenuProvider,
- AppBarProvider appBarProvider,
- DrawerProvider leftDrawerProvider,
- 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 ShopParameters) {
var memberId = member.documentID;
var tasks = <NewAppTask>[];
tasks.add(() async {
var cartPaymentWorkflows = await PaymentWorkflowBuilder(
uniqueId,
app.documentID,
parameters: parameters.paymentParameters,
).create();
parameters.paymentParameters
.registerCartPaymentWorkflows(cartPaymentWorkflows);
var shop = await ShopPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
).create(parameters.shopImage, parameters.faderImage);
await CartPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
shop,
cardBG())
.create(parameters.cartImage);
await PayPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
shop,
cardBG(),
cartPaymentWorkflows)
.create(parameters.payImage);
await OrderOverviewPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
shop,
cardBG())
.create(parameters.orderImage);
await PayConfirmationPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
shop,
cardBG())
.create(parameters.payConfirmationImage);
await ProductPageBuilder(
uniqueId,
app,
memberId,
homeMenuProvider(),
appBarProvider(),
leftDrawerProvider(),
rightDrawerProvider(),
shop)
.create();
});
return tasks;
} else {
throw Exception('Unexpected class for parameters: $parameters');
}
}