copyWith method

AIConversationStarterConfiguration copyWith({
  1. AIConversationStarterStyle? conversationStarterStyle,
  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. String? loadingIconPackageName,
  15. String? emptyIconPackageName,
  16. String? errorIconPackageName,
  17. Future<Map<String, dynamic>> apiConfiguration(
    1. User? user,
    2. Group? group
    )?,
})

Copies current AIConversationStarterConfiguration with some changes

Implementation

AIConversationStarterConfiguration copyWith(
    {AIConversationStarterStyle? conversationStarterStyle,
    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,
    String? loadingIconPackageName,
    String? emptyIconPackageName,
    String? errorIconPackageName,
    Future<Map<String, dynamic>> Function(User? user, Group? group)?
        apiConfiguration}) {
  return AIConversationStarterConfiguration(
    conversationStarterStyle:
        conversationStarterStyle ?? this.conversationStarterStyle,
    theme: theme ?? this.theme,
    emptyStateText: emptyStateText ?? this.emptyStateText,
    loadingStateText: loadingStateText ?? this.loadingStateText,
    errorStateText: errorStateText ?? this.errorStateText,
    customView: customView ?? this.customView,
    emptyStateView: emptyStateView ?? this.emptyStateView,
    loadingStateView: loadingStateView ?? this.loadingStateView,
    errorStateView: errorStateView ?? this.errorStateView,
    errorIconUrl: errorIconUrl ?? this.errorIconUrl,
    emptyIconUrl: emptyIconUrl ?? this.emptyIconUrl,
    loadingIconUrl: loadingIconUrl ?? this.loadingIconUrl,
    loadingIconPackageName:
        loadingIconPackageName ?? this.loadingIconPackageName,
    emptyIconPackageName: emptyIconPackageName ?? this.emptyIconPackageName,
    errorIconPackageName: errorIconPackageName ?? this.errorIconPackageName,
    apiConfiguration: apiConfiguration ?? this.apiConfiguration,
  );
}