Enhanced signature step and adjusted note bloc

This commit is contained in:
Dennis Nemec
2026-01-07 16:07:24 +01:00
parent 622967e5c1
commit 6a53d2d716
4 changed files with 81 additions and 61 deletions

View File

@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter_bloc/flutter_bloc.dart';
@ -71,11 +72,7 @@ class _SignatureViewState extends State<SignatureView> {
}
});
// only load notes if they are not already loaded
final noteState = context.read<NoteBloc>().state;
if (noteState is NoteInitial) {
context.read<NoteBloc>().add(LoadNote(delivery: widget.delivery));
}
context.read<NoteBloc>().add(LoadNote(delivery: widget.delivery));
}
@override
@ -122,7 +119,7 @@ class _SignatureViewState extends State<SignatureView> {
builder: (context, state) {
final current = state;
if (current is NoteLoadedBase) {
if (current is NoteLoaded) {
if (current.notes.isEmpty) {
return const SizedBox(
width: double.infinity,