AiChatBloc constructor

AiChatBloc({
  1. required IAiRepository aiRepository,
})

Implementation

AiChatBloc({
  required this.aiRepository,
}) : super(const AiChatInitial()) {
  on<AiChatEvent>(
    (event, emit) => switch (event) {
      SendMessage() => _sendMessage(event, emit),
      InitChat() => _onInitChat(event, emit),
    },
  );
}