ReplyBloc constructor

ReplyBloc(
  1. 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());
    }
  });
}