BubbleReaction class
Bubble reaction widget for displaying emoji reactions
This widget displays emoji reactions on chat bubbles similar to Facebook Messenger, Slack, or Discord.
reactions is the list of reactions to display
onReactionTap is called when a reaction is tapped
onAddReactionTap is called when the add reaction button is tapped
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BubbleReaction
Constructors
-
BubbleReaction({Key? key, required List<
Reaction> reactions, dynamic onReactionTap(Reaction)?, VoidCallback? onAddReactionTap, bool showAddButton = true, Color backgroundColor = const Color(0xFFF0F0F0), Color userReactionColor = const Color(0xFFE3F2FD), Color textColor = Colors.black87, Color? borderColor, double emojiSize = 16, EdgeInsets chipPadding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4), double spacing = 4, double borderRadius = 12, bool alignRight = false}) -
Creates a BubbleReaction widget
const
Properties
- alignRight → bool
-
whether reactions are aligned to the right (for sender messages)
final
- backgroundColor → Color
-
background color of reaction chips
final
- borderColor → Color?
-
border color for reaction chips
final
- borderRadius → double
-
border radius of reaction chips
final
- chipPadding → EdgeInsets
-
padding inside each reaction chip
final
- emojiSize → double
-
size of the emoji
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onAddReactionTap → VoidCallback?
-
callback when add reaction button is tapped
final
- onReactionTap → dynamic Function(Reaction)?
-
callback when a reaction is tapped
final
-
reactions
→ List<
Reaction> -
list of reactions to display
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAddButton → bool
-
whether to show the add reaction button
final
- spacing → double
-
spacing between reaction chips
final
- textColor → Color
-
text color for reaction count
final
- userReactionColor → Color
-
background color of user's own reactions
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited