BotConfig.setConfig constructor

BotConfig.setConfig({
  1. required String botId,
  2. required BuildContext context,
  3. dynamic enableHistory,
  4. dynamic enableSpeech,
  5. dynamic enableCloseButton,
})

Implementation

BotConfig.setConfig({
  required String botId,
  required BuildContext context,
  enableHistory,
  enableSpeech,
  enableCloseButton,
}) {
  this.context = context;
  this.botId = botId;
  this.enableHistory = enableHistory ?? false;
  this.enableSpeech = enableSpeech ?? false;
  this.enableCloseButton = enableCloseButton ?? true;
  this.botUrl =
      "$BASE_URL?botId=${this.botId}&enableHistory=${this.enableHistory.toString()}&ym.payload=";
}