BotConfiguration constructor
const
BotConfiguration({
- required String userID,
- required String projectSecretKey,
- String? welcomeMessage,
- String? allowedOrigins,
- String? name,
- @Default.new('Roboto') String? fontFamily,
- @Default.new('#3B82F6') String? color,
- @unfreezed Uint8List? avatar,
- String? systemInstructions,
- @Default.new(false) bool isPreviewMode,
- @Default.new(FabConfiguration()) FabConfiguration fabConfiguration,
Implementation
const factory BotConfiguration({
/// Unique identifier for the user interacting with the bot.
required String userID,
/// Secret key for authenticating with the bot service.
/// Keep this secure and never expose in logs.
required String projectSecretKey,
/// Initial message displayed when the chat opens.
String? welcomeMessage,
/// Comma-separated list of allowed origins for CORS.
String? allowedOrigins,
/// Display name for the chatbot.
String? name,
/// Font family for chat text. Defaults to 'Roboto'.
@Default('Roboto') String? fontFamily,
/// Primary color for the chat interface in hex format.
@Default('#3B82F6') String? color,
/// Avatar image data. Note: This is excluded from JSON serialization.
@unfreezed Uint8List? avatar,
/// System instructions that guide the bot's behavior.
String? systemInstructions,
/// Whether the bot is running in preview mode.
@Default(false) bool isPreviewMode,
/// Configuration for the floating action button appearance.
@Default(FabConfiguration()) FabConfiguration fabConfiguration,
}) = _BotConfiguration;