ReactionButton<T> class

Inheritance

Constructors

ReactionButton({Key? key, required ValueChanged<Reaction<T>?> onReactionChanged, required List<Reaction<T>?> reactions, Reaction<T>? placeholder, Reaction<T>? selectedReaction, Color boxColor = Colors.white, double boxElevation = 5, double boxRadius = 50, bool isChecked = false, double itemsSpacing = 8, double itemScale = .3, required Size itemSize, bool animateBox = true, bool toggle = true, EdgeInsetsGeometry boxPadding = const EdgeInsets.all(4), Duration boxAnimationDuration = const Duration(milliseconds: 200), Duration itemAnimationDuration = const Duration(milliseconds: 100), Duration hoverDuration = const Duration(milliseconds: 400), Widget? child})
const

Properties

animateBox bool
final
boxAnimationDuration Duration
Reactions box visibility duration default = 200 milliseconds
final
boxColor Color
Reactions box color default = white
final
boxElevation double
Reactions box elevation default = 5
final
boxPadding EdgeInsetsGeometry
Reactions box padding default = const EdgeInsets.all(0)
final
boxRadius double
Reactions box radius default = 50
final
child Widget?
final
hashCode int
The hash code for this object.
no setterinherited
hoverDuration Duration
final
isChecked bool
Flag for pre-set reactions if true @link selectedReaction will be displayed else @link initialReaction will be displayed default = false
final
itemAnimationDuration Duration
Animation duration while moving default = const Duration(milliseconds: 100)
final
itemScale double
Scale ratio when item hovered default = 0.3
final
itemSize Size
final
itemsSpacing double
Spacing between the reaction items
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onReactionChanged ValueChanged<Reaction<T>?>
This triggers when reaction button value changed.
final
placeholder Reaction<T>?
Default widget if no reaction selected
final
reactions List<Reaction<T>?>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedReaction Reaction<T>?
Selected reaction button when tap on widget
final
toggle bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ReactionButton<T>>
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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