BotConfiguration constructor

const BotConfiguration({
  1. required String userID,
  2. required String projectSecretKey,
  3. String? welcomeMessage,
  4. String? allowedOrigins,
  5. String? name,
  6. @Default.new('Roboto') String? fontFamily,
  7. @Default.new('#3B82F6') String? color,
  8. @unfreezed Uint8List? avatar,
  9. String? systemInstructions,
  10. @Default.new(false) bool isPreviewMode,
  11. @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;