startTask method

  1. @override
Future<void> startTask(
  1. AppModel app,
  2. BuildContext context,
  3. String? memberId,
  4. AssignmentModel? assignmentModel,
)
override

Implementation

@override
Future<void> startTask(AppModel app, BuildContext context, String? memberId,
    AssignmentModel? assignmentModel) {
  feedback = null;
  openWidgetDialog(
    app,
    context,
    '${app.documentID}/payment',
    child: YesNoIgnoreDialogWithAssignmentResults.get(app, context,
        title: 'Payment',
        message:
            'Review the payment and ship the products. If you like you can provide some feedback to the buyer below.',
        resultsPrevious: assignmentModel!.resultsPrevious,
        yesFunction: () =>
            _reviewedOk(app, context, assignmentModel, feedback!),
        noFunction: () =>
            _reviewedNotOk(app, context, assignmentModel, feedback!),
        extraFields: [
          StyleRegistry.registry()
              .styleWithApp(app)
              .frontEndStyle()
              .listTileStyle()
              .getListTile(app, context,
                  leading: Icon(Icons.payment),
                  title: StyleRegistry.registry()
                      .styleWithApp(app)
                      .frontEndStyle()
                      .dialogFieldStyle()
                      .dialogField(
                        app,
                        context,
                        valueChanged: (value) => feedback = value,
                        decoration: const InputDecoration(
                          hintText: 'Feedback to the buyer',
                          labelText: 'Feedback to the buyer',
                        ),
                      ))
        ]),
  );
  return Future.value(null);
}