toBotConfiguration method
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,
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,
);
}