toBotConfiguration method

BotConfiguration toBotConfiguration({
  1. required String userID,
  2. required String projectSecretKey,
  3. Uint8List? avatar,
  4. String? currentLocale,
  5. String? userIdSignature,
  6. bool isPreviewMode = false,
  7. Map<String, dynamic>? userContext,
  8. String? authToken,
})

Implementation

BotConfiguration toBotConfiguration({
  required String userID,
  required String projectSecretKey,
  Uint8List? avatar,
  String? currentLocale,
  String? userIdSignature,
  bool isPreviewMode = false,
  Map<String, dynamic>? userContext,
  String? authToken,
}) {
  return BotConfiguration(
    userID: userID,
    projectSecretKey: projectSecretKey,
    userIdSignature: userIdSignature,
    name: name,
    welcomeMessage: welcomeMessage,
    systemInstructions: systemInstruction,
    defaultLocale: defaultLocale,
    supportedLocales: supportedLocales,
    currentLocale: currentLocale,
    fontFamily: fontFamily ?? 'Roboto',
    // Pass the server colour through as-is: null means "inherit the host
    // app's theme colour", resolved downstream in chat_screen. Coercing
    // it to a hex here would make "unset" impossible.
    color: color,
    avatar: avatar,
    showAvatar: showAvatar,
    hideBarsOnScroll: hideBarsOnScroll,
    fabConfiguration: fabConfiguration ?? const FabConfiguration(),
    chatAppearance: chatAppearance,
    chatAppearanceDark: chatAppearanceDark,
    showThemeToggle: showThemeToggle,
    defaultThemeMode: defaultThemeMode,
    soundConfiguration: soundConfiguration ?? const SoundConfiguration(),
    enableUserExport: enableUserExport,
    enableClearHistory: enableClearHistory,
    enableFileAttach: enableFileAttach,
    dynamicLanguageEnabled: dynamicLanguageEnabled,
    aiDisclosureEnabled: aiDisclosureEnabled,
    aiDisclosureText: aiDisclosureText,
    aiDisclosureRequireAck: aiDisclosureRequireAck,
    messageReportingEnabled: messageReportingEnabled,
    aiInfoUrl: aiInfoUrl,
    privacyUrl: privacyUrl,
    aiDataReuseNotice: aiDataReuseNotice,
    isPreviewMode: isPreviewMode,
    userContext: userContext,
    authToken: authToken,
  );
}