RemoteConfig constructor

const RemoteConfig({
  1. required LocalizedText name,
  2. @JsonKey.new(name: 'welcome_message') required LocalizedText welcomeMessage,
  3. @JsonKey.new(name: 'system_instruction') required LocalizedText systemInstruction,
  4. @JsonKey.new(name: 'default_locale') @Default.new('en') String defaultLocale,
  5. @JsonKey.new(name: 'supported_locales') @Default.new(['en']) List<String> supportedLocales,
  6. String? fontFamily,
  7. String? color,
  8. String? avatar,
  9. @JsonKey.new(name: 'fab_configuration') FabConfiguration? fabConfiguration,
})

Implementation

const factory RemoteConfig({
  /// Bot display name from server (localized).
  required LocalizedText name,

  /// Welcome message from server configuration (localized).
  // ignore: invalid_annotation_target
  @JsonKey(name: 'welcome_message') required LocalizedText welcomeMessage,

  /// System instructions from server (localized).
  // ignore: invalid_annotation_target
  @JsonKey(name: 'system_instruction')
  required LocalizedText systemInstruction,

  /// Default locale from server
  // ignore: invalid_annotation_target
  @JsonKey(name: 'default_locale') @Default('en') String defaultLocale,

  /// Supported locales from server
  // ignore: invalid_annotation_target
  @JsonKey(name: 'supported_locales')
  @Default(['en'])
  List<String> supportedLocales,

  /// Font family setting from server.
  String? fontFamily,

  /// Primary color setting from server.
  String? color,

  /// Avatar URL or data from server.
  String? avatar,

  /// FAB configuration from server.
  // ignore: invalid_annotation_target
  @JsonKey(name: 'fab_configuration') FabConfiguration? fabConfiguration,
}) = _RemoteConfig;