copyWith method
AIAssistBotConfiguration
copyWith({
- AIAssistBotStyle? aiAssistBotStyle,
- CometChatTheme? theme,
- String? emptyStateText,
- String? loadingStateText,
- String? errorStateText,
- Widget customView(
- List<
String> replies, - BuildContext context
- List<
- Widget conversationStarterEmptyView(
- List<
String> replies, - BuildContext context
- List<
- WidgetBuilder? emptyStateView,
- WidgetBuilder? loadingStateView,
- WidgetBuilder? errorStateView,
- String? errorIconUrl,
- String? emptyIconUrl,
- String? loadingIconUrl,
- Future<
Map< apiConfiguration()?,String, dynamic> >
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,
);
}