LikeButton constructor
const
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,
Implementation
const LikeButton(
{Key? key,
this.size = 30.0,
this.likeBuilder,
this.countBuilder,
double? bubblesSize,
double? circleSize,
this.likeCount,
this.isLiked = false,
this.mainAxisAlignment = MainAxisAlignment.center,
this.crossAxisAlignment = CrossAxisAlignment.center,
this.animationDuration = const Duration(milliseconds: 1000),
this.likeCountAnimationType = LikeCountAnimationType.part,
this.likeCountAnimationDuration = const Duration(milliseconds: 500),
this.likeCountPadding = const EdgeInsets.only(left: 3.0),
this.bubblesColor = const BubblesColor(
dotPrimaryColor: Color(0xFFFFC107),
dotSecondaryColor: Color(0xFFFF9800),
dotThirdColor: Color(0xFFFF5722),
dotLastColor: Color(0xFFF44336),
),
this.circleColor =
const CircleColor(start: Color(0xFFFF5722), end: Color(0xFFFFC107)),
this.onTap,
this.countPostion = CountPostion.right,
this.padding,
this.countDecoration})
: bubblesSize = bubblesSize ?? size * 2.0,
circleSize = circleSize ?? size * 0.8,
super(key: key);