init method

  1. @override
void init()
override

Implementation

@override
void init() {
  TaskModelRegistry.registry()!.addTask(
      identifier: FixedAmountPayModel.label,
      definition: FixedAmountPayModel.definition,
      mapper: FixedAmountPayModelMapper(),
      editor: (app, model) =>
          FixedAmountPayEditorWidget(app: app, model: model),
      createNewInstance: () => FixedAmountPayModel(
          identifier: FixedAmountPayModel.label,
          description: 'Fixed amount to be paid with card',
          executeInstantly: true,
          paymentType: CreditCardPayTypeModel()));
  TaskModelRegistry.registry()!.addTask(
      identifier: ContextAmountPayModel.label,
      definition: ContextAmountPayModel.definition,
      mapper: ContextAmountPayModelMapper(),
      editor: (app, model) =>
          ContextAmountPayEditorWidget(app: app, model: model),
      createNewInstance: () => ContextAmountPayModel(
          identifier: ContextAmountPayModel.label,
          description: 'Amount determined by context and to be paid by card',
          executeInstantly: true,
          paymentType: CreditCardPayTypeModel()));
  TaskModelRegistry.registry()!.addTask(
      identifier: ReviewAndShipTaskModel.label,
      definition: ReviewAndShipTaskModel.definition,
      mapper: ReviewAndShipTaskModelMapper(),
      createNewInstance: () => ReviewAndShipTaskModel(
          identifier: ReviewAndShipTaskModel.label,
          description: 'Review and ship',
          executeInstantly: true));
}