Fixed missing loading spinner due to seeded streams in note repository.

This commit is contained in:
Dennis Nemec
2026-01-08 15:59:45 +01:00
parent 6eafb0fab0
commit b481a45afc
4 changed files with 63 additions and 58 deletions

View File

@ -121,14 +121,9 @@ class _DeliveryDetailState extends State<DeliveryDetail> {
void _openSignatureView(Delivery delivery) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) {
return BlocProvider(
create:
(context) => NoteBloc(
repository: NoteRepository(service: NoteService()),
opBloc: context.read<OperationBloc>(),
deliveryId: delivery.id,
),
builder: (_) {
return BlocProvider.value(
value: context.read<NoteBloc>(),
child: SignatureView(onSigned: _onSign, delivery: delivery),
);
},
@ -160,11 +155,13 @@ class _DeliveryDetailState extends State<DeliveryDetail> {
Padding(
padding: const EdgeInsets.only(left: 20),
child: FilledButton(
onPressed:
() =>
_step == _steps.length - 1
? _openSignatureView(delivery)
: _clickForward,
onPressed: () {
if (_step == _steps.length - 1) {
_openSignatureView(delivery);
} else {
_clickForward();
}
},
child:
_step == _steps.length - 1
? const Text("Unterschreiben")