copyWith method

AIAssistBotConfiguration copyWith({
  1. AIAssistBotStyle? aiAssistBotStyle,
  2. CometChatTheme? theme,
  3. String? emptyStateText,
  4. String? loadingStateText,
  5. String? errorStateText,
  6. Widget customView(
    1. List<String> replies,
    2. BuildContext context
    )?,
  7. Widget conversationStarterEmptyView(
    1. List<String> replies,
    2. BuildContext context
    )?,
  8. WidgetBuilder? emptyStateView,
  9. WidgetBuilder? loadingStateView,
  10. WidgetBuilder? errorStateView,
  11. String? errorIconUrl,
  12. String? emptyIconUrl,
  13. String? loadingIconUrl,
  14. Future<Map<String, dynamic>> apiConfiguration(
    1. User aiBot,
    2. User? user,
    3. Group? group
    )?,
})

Copies current AIAssistBotConfiguration with some changes

Implementation

AIAssistBotConfiguration copyWith(
    {AIAssistBotStyle? aiAssistBotStyle,
    CometChatTheme? theme,
    String? emptyStateText,
    String? loadingStateText,
    String? errorStateText,
    Widget Function(List<String> replies, BuildContext context)? customView,
    Widget Function(List<String> replies, BuildContext context)?
        conversationStarterEmptyView,
    WidgetBuilder? emptyStateView,
    WidgetBuilder? loadingStateView,
    WidgetBuilder? errorStateView,
    String? errorIconUrl,
    String? emptyIconUrl,
    String? loadingIconUrl,
    Future<Map<String, dynamic>> Function(
            User aiBot, User? user, Group? group)?
        apiConfiguration}) {
  return AIAssistBotConfiguration(
    aiAssistBotStyle: aiAssistBotStyle ?? aiAssistBotStyle,
    theme: theme ?? theme,
    emptyStateText: emptyStateText ?? this.emptyStateText,
    loadingStateText: loadingStateText ?? this.loadingStateText,
    errorStateText: errorStateText ?? this.errorStateText,
    emptyStateView: emptyStateView ?? this.emptyStateView,
    loadingStateView: loadingStateView ?? this.loadingStateView,
    errorStateView: errorStateView ?? this.errorStateView,
    errorIconUrl: errorIconUrl ?? this.errorIconUrl,
    emptyIconUrl: emptyIconUrl ?? this.emptyIconUrl,
    loadingIconUrl: loadingIconUrl ?? this.loadingIconUrl,
    apiConfiguration: apiConfiguration ?? this.apiConfiguration,
  );
}