copyWith method
AISmartRepliesConfiguration
copyWith({
- AISmartRepliesStyle? smartRepliesStyle,
- CometChatTheme? theme,
- String? emptyStateText,
- OnError? onError,
- String? errorStateText,
- Widget customView(
- List<
String> replies, - BuildContext context
- List<
- dynamic onClick(
- User? user,
- Group? group,
- dynamic onSuccess(
- Widget,
- bool isLoading,
- BuildContext context
- dynamic onError(
- CometChatException e,
- bool isError,
- BuildContext context
- String? loadingStateText,
- WidgetBuilder? emptyStateView,
- WidgetBuilder? loadingStateView,
- WidgetBuilder? errorStateView,
- String? errorIconUrl,
- String? emptyIconUrl,
- String? loadingIconUrl,
- Future<
Map< apiConfiguration()?,String, dynamic> >
Copies current AISmartRepliesConfiguration with some changes
Implementation
AISmartRepliesConfiguration copyWith(
{AISmartRepliesStyle? smartRepliesStyle,
CometChatTheme? theme,
String? emptyStateText,
OnError? onError,
String? errorStateText,
Widget Function(List<String> replies, BuildContext context)? customView,
Function(
User? user,
Group? group,
Function(Widget, bool isLoading, BuildContext context) onSuccess,
Function(CometChatException e, bool isError, BuildContext context)
onError)?
onClick,
String? loadingStateText,
WidgetBuilder? emptyStateView,
WidgetBuilder? loadingStateView,
WidgetBuilder? errorStateView,
String? errorIconUrl,
String? emptyIconUrl,
String? loadingIconUrl,
Future<Map<String, dynamic>> Function(User? user, Group? group)?
apiConfiguration}) {
return AISmartRepliesConfiguration(
smartRepliesStyle: smartRepliesStyle ?? this.smartRepliesStyle,
theme: theme ?? this.theme,
emptyStateText: emptyStateText ?? this.emptyStateText,
onError: onError ?? this.onError,
errorStateText: errorStateText ?? this.errorStateText,
customView: customView ?? this.customView,
onClick: onClick ?? this.onClick,
loadingStateText: loadingStateText ?? this.loadingStateText,
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,
);
}