Fixed missing loading spinner due to seeded streams in note repository.
This commit is contained in:
@ -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")
|
||||
|
||||
Reference in New Issue
Block a user