ChatReactionsConfig constructor
const
ChatReactionsConfig({
- List<
String> availableReactions = const ['👍', '❤️', '😂', '😮', '😢', '😠', '➕'], - Duration animationDuration = const Duration(milliseconds: 300),
- Duration dialogTransitionDuration = const Duration(milliseconds: 300),
- bool showAddReactionButton = true,
- bool enableHapticFeedback = true,
- bool enableLongPress = true,
- bool enableDoubleTap = false,
- int maxReactionsToShow = 5,
- double reactionSize = 25.0,
- double stackedValue = 4.0,
- EdgeInsets dialogPadding = const EdgeInsets.all(20.0),
- BorderRadius? dialogBorderRadius,
- Color? dialogBackgroundColor,
- String? reactionAddIcon,
- Color? itemTextColor,
- double dialogBlurSigma = 5.0,
- double heightMessageBox = 400.0,
- double widthMessageBox = 275.0,
- bool dismissOnTapOutside = true,
- bool showContextMenu = true,
- Widget emojiPickerBuilder(
- BuildContext,
- dynamic onEmojiSelected()
- Widget customReactionBuilder()?,
- Widget customMenuItemBuilder()?,
Implementation
const ChatReactionsConfig({
this.availableReactions = const ['👍', '❤️', '😂', '😮', '😢', '😠', '➕'],
this.menuItems = const [
MenuItem(label: 'Reply', icon: "assets/reaction_chat/reply_item.png"),
MenuItem(label: 'Copy', icon: "assets/reaction_chat/copy_item.png"),
MenuItem(label: 'Select and copy', icon: "assets/reaction_chat/copy_item.png"),
MenuItem(
label: 'Delete', icon: "assets/reaction_chat/delete_item.png", isDestructive: true),
],
this.animationDuration = const Duration(milliseconds: 300),
this.dialogTransitionDuration = const Duration(milliseconds: 300),
this.showAddReactionButton = true,
this.enableHapticFeedback = true,
this.enableLongPress = true,
this.enableDoubleTap = false,
this.maxReactionsToShow = 5,
this.reactionSize = 25.0,
this.stackedValue = 4.0,
this.dialogPadding = const EdgeInsets.all(20.0),
this.dialogBorderRadius,
this.dialogBackgroundColor,
this.reactionAddIcon,
this.itemTextColor,
this.dialogBlurSigma = 5.0,
this.heightMessageBox = 400.0,
this.widthMessageBox = 275.0,
this.dismissOnTapOutside = true,
this.showContextMenu = true,
this.emojiPickerBuilder = _defaultEmojiPickerBuilder,
this.customReactionBuilder,
this.customMenuItemBuilder,
});