LikeButton class

Inheritance

Constructors

LikeButton({Key? key, double size = 30.0, LikeWidgetBuilder? likeBuilder, LikeCountWidgetBuilder? countBuilder, double? bubblesSize, double? circleSize, int? likeCount, bool? isLiked = false, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, Duration animationDuration = const Duration(milliseconds: 1000), LikeCountAnimationType likeCountAnimationType = LikeCountAnimationType.part, Duration likeCountAnimationDuration = const Duration(milliseconds: 500), EdgeInsetsGeometry? likeCountPadding = const EdgeInsets.only(left: 3.0), BubblesColor bubblesColor = const BubblesColor(dotPrimaryColor: Color(0xFFFFC107), dotSecondaryColor: Color(0xFFFF9800), dotThirdColor: Color(0xFFFF5722), dotLastColor: Color(0xFFF44336)), CircleColor circleColor = const CircleColor(start: Color(0xFFFF5722), end: Color(0xFFFFC107)), LikeButtonTapCallback? onTap, CountPostion countPostion = CountPostion.right, EdgeInsetsGeometry? padding, CountDecoration? countDecoration, dynamic postFrameCallback(LikeButtonState state)?})
const

Properties

animationDuration Duration
animation duration to change isLiked state
final
bubblesColor BubblesColor
colors of bubbles
final
bubblesSize double
total size of bubbles
final
circleColor CircleColor
colors of circle
final
circleSize double
size of circle
final
countBuilder LikeCountWidgetBuilder?
builder to create like count widget
final
countDecoration CountDecoration?
return count widget with decoration
final
countPostion CountPostion
like count widget postion left of like widget right of like widget top of like widget bottom of like widget
final
crossAxisAlignment CrossAxisAlignment
crossAxisAlignment for like button
final
hashCode int
The hash code for this object.
no setterinherited
isLiked bool?
whether it is liked it's initial value you can get current value from onTap/countBuilder
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
likeBuilder LikeWidgetBuilder?
builder to create like widget
final
likeCount int?
like count if null, will not show it's initial value you can get current value from countBuilder
final
likeCountAnimationDuration Duration
animation duration to change like count
final
likeCountAnimationType LikeCountAnimationType
animation type to change like count(none,part,all)
final
likeCountPadding EdgeInsetsGeometry?
padding for like count widget
final
mainAxisAlignment MainAxisAlignment
mainAxisAlignment for like button
final
onTap LikeButtonTapCallback?
tap call back of like button
final
padding EdgeInsetsGeometry?
padding of like button
final
postFrameCallback → (dynamic Function(LikeButtonState state)?)
call back of first frame with LikeButtonState
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size double
size of like widget
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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