CodeChatOpenai constructor

const CodeChatOpenai({
  1. Key? key,
  2. required String url,
  3. Map<String, dynamic> requestBuilder(
    1. String input
    )?,
  4. void onResponseSuccess(
    1. dynamic response,
    2. String input
    )?,
  5. ValueNotifier<List<ChatMessage>>? chatsValueListenable,
  6. Widget chatBuilder(
    1. BuildContext context,
    2. ChatMessage chat
    )?,
  7. void onFailure(
    1. dynamic error,
    2. dynamic response,
    3. String input
    )?,
  8. PreferredSizeWidget? appBar,
  9. Widget sendButtonBuilder(
    1. BuildContext context,
    2. void onSend()
    )?,
  10. Widget? botIcon,
  11. Widget textFormFieldBuilder(
    1. BuildContext context,
    2. TextEditingController controller,
    3. FocusNode focusNode,
    4. void onFieldSubmitted(),
    )?,
  12. Widget? loadingIndicator,
})

Implementation

const CodeChatOpenai({
  Key? key,
  required this.url,
  this.requestBuilder,
  this.onResponseSuccess,
  this.chatsValueListenable,
  this.chatBuilder,
  this.onFailure,
  this.appBar,
  this.sendButtonBuilder,
  this.botIcon,
  this.textFormFieldBuilder,
  this.loadingIndicator,
}) : super(key: key);