LikeButton constructor

const LikeButton({
  1. Key? key,
  2. double size = 30.0,
  3. LikeWidgetBuilder? likeBuilder,
  4. LikeCountWidgetBuilder? countBuilder,
  5. double? bubblesSize,
  6. double? circleSize,
  7. int? likeCount,
  8. bool? isLiked = false,
  9. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center,
  10. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  11. Duration animationDuration = const Duration(milliseconds: 1000),
  12. LikeCountAnimationType likeCountAnimationType = LikeCountAnimationType.part,
  13. Duration likeCountAnimationDuration = const Duration(milliseconds: 500),
  14. EdgeInsetsGeometry? likeCountPadding = const EdgeInsets.only(left: 3.0),
  15. BubblesColor bubblesColor = const BubblesColor(dotPrimaryColor: Color(0xFFFFC107), dotSecondaryColor: Color(0xFFFF9800), dotThirdColor: Color(0xFFFF5722), dotLastColor: Color(0xFFF44336)),
  16. CircleColor circleColor = const CircleColor(start: Color(0xFFFF5722), end: Color(0xFFFFC107)),
  17. LikeButtonTapCallback? onTap,
  18. CountPostion countPostion = CountPostion.right,
  19. EdgeInsetsGeometry? padding,
  20. 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);