Implemented note templates and enhanced usability by adjusting the dimension of the note dialogs
This commit is contained in:
@ -25,15 +25,17 @@ class NoteBloc extends Bloc<NoteEvent, NoteState> {
|
||||
required this.opBloc,
|
||||
required this.deliveryId,
|
||||
}) : super(NoteInitial()) {
|
||||
_combinedSubscription = CombineLatestStream.combine2(
|
||||
_combinedSubscription = CombineLatestStream.combine3(
|
||||
repository.notes,
|
||||
repository.images,
|
||||
(note, image) => {"note": note, "image": image},
|
||||
repository.templates,
|
||||
(note, image, templates) => {"note": note, "image": image, "templates": templates},
|
||||
).listen(
|
||||
(data) => add(
|
||||
DataUpdated(
|
||||
images: data["image"] as List<ImageNote>,
|
||||
notes: data["note"] as List<Note>,
|
||||
templates: data["templates"] as List<NoteTemplate>
|
||||
),
|
||||
),
|
||||
);
|
||||
@ -56,7 +58,7 @@ class NoteBloc extends Bloc<NoteEvent, NoteState> {
|
||||
}
|
||||
|
||||
Future<void> _dataUpdated(DataUpdated event, Emitter<NoteState> emit) async {
|
||||
emit(NoteLoaded(notes: event.notes, images: event.images));
|
||||
emit(NoteLoaded(notes: event.notes, images: event.images, templates: event.templates));
|
||||
}
|
||||
|
||||
Future<void> _reset(ResetNotes event, Emitter<NoteState> emit) async {
|
||||
|
||||
Reference in New Issue
Block a user