|
|
@ -25,7 +25,7 @@ abstract class $NotesBloc extends RxBlocBase implements NotesBlocEvents, NotesBl |
|
|
|
final _$createNoteEvent = PublishSubject<NotesNote>(); |
|
|
|
final _$createNoteEvent = PublishSubject<NotesNote>(); |
|
|
|
|
|
|
|
|
|
|
|
/// Тhe [Subject] where events sink to by calling [updateNote] |
|
|
|
/// Тhe [Subject] where events sink to by calling [updateNote] |
|
|
|
final _$updateNoteEvent = PublishSubject<_UpdateNoteEventArgs>(); |
|
|
|
final _$updateNoteEvent = PublishSubject<NotesNote>(); |
|
|
|
|
|
|
|
|
|
|
|
/// Тhe [Subject] where events sink to by calling [deleteNote] |
|
|
|
/// Тhe [Subject] where events sink to by calling [deleteNote] |
|
|
|
final _$deleteNoteEvent = PublishSubject<NotesNote>(); |
|
|
|
final _$deleteNoteEvent = PublishSubject<NotesNote>(); |
|
|
@ -46,7 +46,7 @@ abstract class $NotesBloc extends RxBlocBase implements NotesBlocEvents, NotesBl |
|
|
|
void createNote(NotesNote note) => _$createNoteEvent.add(note); |
|
|
|
void createNote(NotesNote note) => _$createNoteEvent.add(note); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void updateNote(int id, String etag, NotesNote note) => _$updateNoteEvent.add(_UpdateNoteEventArgs(id, etag, note)); |
|
|
|
void updateNote(NotesNote note) => _$updateNoteEvent.add(note); |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void deleteNote(NotesNote note) => _$deleteNoteEvent.add(note); |
|
|
|
void deleteNote(NotesNote note) => _$deleteNoteEvent.add(note); |
|
|
@ -82,15 +82,3 @@ abstract class $NotesBloc extends RxBlocBase implements NotesBlocEvents, NotesBl |
|
|
|
super.dispose(); |
|
|
|
super.dispose(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Helps providing the arguments in the [Subject.add] for |
|
|
|
|
|
|
|
/// [NotesBlocEvents.updateNote] event |
|
|
|
|
|
|
|
class _UpdateNoteEventArgs { |
|
|
|
|
|
|
|
const _UpdateNoteEventArgs(this.id, this.etag, this.note); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final int id; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final String etag; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final NotesNote note; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|