void struck

This commit is contained in:
efrilm
2025-11-10 13:06:06 +07:00
parent af182b6f5a
commit c5673a147c
8 changed files with 381 additions and 35 deletions
@@ -64,6 +64,22 @@ class PrintStruckBloc extends Bloc<PrintStruckEvent, PrintStruckState> {
order: e.order,
);
emit(
state.copyWith(
isPrinting: false,
failureOrPrintStruck: optionOf(failureOrSuccess),
),
);
},
voided: (e) async {
Either<PrinterFailure, Unit> failureOrSuccess;
emit(state.copyWith(isPrinting: true, failureOrPrintStruck: none()));
failureOrSuccess = await _printerRepository.printStruckVoid(
order: e.order,
);
emit(
state.copyWith(
isPrinting: false,