ReplyBloc constructor
ReplyBloc(
- Chat chat
Implementation
ReplyBloc(Chat chat) : super(const ReplyState.initial()) {
instance = this;
on<ReplyEvent>((event, emit) async {
switch (event) {
case ReplyStart():
emit(state.copyWith(replying: event.message));
case ReplyCancel():
emit(const ReplyState.initial());
}
});
}