StickerConfiguration class

StickerConfiguration is a data class that has configuration properties to customize the functionality and appearance of StickersExtension

Has no effect in v6. Set the sticker button on the composer instead: CometChatMessageComposer.stickerIcon and CometChatMessageComposer.stickerActiveIcon replace stickerButtonIcon and keyboardButtonIcon; CometChatMessageComposerStyle.stickerIconColor and CometChatMessageComposerStyle.stickerActiveIconColor replace stickerIconTint and keyboardIconTint. Style the sticker keyboard with CometChatMessageComposerStyle.stickerKeyboardStyle or a CometChatStickerKeyboardStyle theme extension. errorIcon, errorStateText and emptyStateText have no replacement.


final stickerConfig = StickerConfiguration(
  errorIcon: Icon(Icons.error),
  emptyStateView: (context) => Text('No stickers available.'),
  errorStateView: (context) => Text('Failed to load stickers.'),
  loadingStateView: (context) => CircularProgressIndicator(),
  errorStateText: 'Error fetching stickers',
  emptyStateText: 'No stickers available',
  stickerButtonIcon: Icon(Icons.sticky_note_2),
  keyboardButtonIcon: Icon(Icons.keyboard),
  stickerBubbleHeight: 100,
  stickerBubbleWidth: 100,
);

Annotations
  • @Deprecated('Has no effect: no API in v6 accepts an extension configuration object. ' 'Use CometChatMessageComposer.stickerIcon / stickerActiveIcon for the ' 'sticker button icons, CometChatMessageComposerStyle.stickerIconColor / ' 'stickerActiveIconColor for their tints, and ' 'CometChatMessageComposerStyle.stickerKeyboardStyle or the ' 'CometChatStickerKeyboardStyle theme extension for the sticker keyboard, ' 'and stickerBubbleStyle on CometChatIncomingMessageBubbleStyle / ' 'CometChatOutgoingMessageBubbleStyle for the sticker bubble. Custom ' 'loading, empty and error views exist only on a standalone ' 'CometChatStickerKeyboard. errorIcon, errorStateText, emptyStateText, ' 'stickerBubbleHeight, stickerBubbleWidth and stickerUrl have no ' 'replacement. ' 'Will be removed in 7.0.0.')

Constructors

StickerConfiguration({Widget? errorIcon, WidgetBuilder? emptyStateView, WidgetBuilder? errorStateView, WidgetBuilder? loadingStateView, String? errorStateText, String? emptyStateText, Widget? stickerButtonIcon, Widget? keyboardButtonIcon, Color? stickerIconTint, Color? keyboardIconTint, double? stickerBubbleHeight, double? stickerBubbleWidth, String? stickerUrl})
Creates a StickerConfiguration.

Properties

emptyStateText → String?
emptyStateText text to be shown at empty state
final
emptyStateView → WidgetBuilder?
emptyStateView to be shown when there are no stickers
final
errorIcon → Widget?
errorIcon icon to be shown in case of any error
final
errorStateText → String?
errorStateText text to be show in error state
final
errorStateView → WidgetBuilder?
errorStateView to be shown when some error occurs on fetching the sticker
final
hashCode → int
The hash code for this object.
no setterinherited
keyboardButtonIcon → Widget?
keyboardButtonIcon hides stickers keyboard
final
keyboardIconTint → Color?
keyboardIconTint provides color to the keyboard Icon/widget
final
loadingStateView → WidgetBuilder?
loadingStateView view at loading state
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stickerBubbleHeight → double?
stickerBubbleHeight height of the sticker
final
stickerBubbleWidth → double?
stickerBubbleWidth width of the sticker
final
stickerButtonIcon → Widget?
stickerButtonIcon shows stickers keyboard
final
stickerIconTint → Color?
stickerIconTint provides color to the sticker Icon/widget
final
stickerUrl → String?
stickerUrl if message object is not passed then sticker url should be passed
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited