copyWith method

ChatBotState copyWith({
  1. List<List<ChatBotMessage>>? messages,
  2. bool? loading,
  3. List<String>? allowedMessage,
  4. String? error,
})

Implementation

ChatBotState copyWith({
  List<List<ChatBotMessage>>? messages,
  bool? loading,
  List<String>? allowedMessage,
  String? error,
}) {
  return ChatBotState(
    messages: messages ?? this.messages,
    loading: loading ?? this.loading,
    allowedMessage: allowedMessage ?? this.allowedMessage,
    error: error ?? this.error,
  );
}