split struct

This commit is contained in:
efrilm
2025-11-10 13:28:18 +07:00
parent c5673a147c
commit f5256fb33d
10 changed files with 405 additions and 56 deletions
@@ -80,6 +80,22 @@ class PrintStruckBloc extends Bloc<PrintStruckEvent, PrintStruckState> {
order: e.order,
);
emit(
state.copyWith(
isPrinting: false,
failureOrPrintStruck: optionOf(failureOrSuccess),
),
);
},
splitBill: (e) async {
Either<PrinterFailure, Unit> failureOrSuccess;
emit(state.copyWith(isPrinting: true, failureOrPrintStruck: none()));
failureOrSuccess = await _printerRepository.printStruckSplitBill(
order: e.order,
);
emit(
state.copyWith(
isPrinting: false,