Search packages, repositories and app categories

GitHub repositoryMohamadGreatWarrior/tiktok_double_tap_like

tiktok_double_tap_like

MohamadGreatWarrior/tiktok_double_tap_like open-source repository details.

tiktok_double_tap_like project cover
Stars
4
Forks
1
Last push (UTC)
Oct 20, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

tiktok_double_tap_like

TikTok Double Tap Like

About

TikTok Double Tap Like is a Flutter package that provides a widget that can be used to like a video by double tapping on it, just like TikTok.

Example

tiktok_double_tap_like

DoubleTapLikeWidget(
      onLike: (likeCount) {
        //Do something when the user double taps
      },
      likeWidget: const Image(image: AssetImage('assets/icons/heart.png')),
      likeWidth: 200,
      likeHeight: 200,
      child: VideoPlayer(),
    )

Notes

  • You have to provide a widget that will be displayed when the user double taps on the screen, whether Text, Icon...etc. You can use the likeWidget property to provide that widget.

  • You can also provide the width and height of the widget using the likeWidth and likeHeight properties. The default values are 200 each.

  • You have the likeCount param in onLike in case you want to know how many times the user has liked the video.

  • It's pretty efficient and performant, I've created the animation explicitly using AnimationController, Animation, Tween and AnimatedBuilder. Also, there's an applied mechanism to removing the added hearts off of the screen.

Help me

If you like this package you can support me on

Buy Me A Coffee

Mohamad Tayan GitHub avatar
GitHub author

Mohamad Tayan ↗

LanguagesC++CMakeDartSwiftCHTMLKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^3.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗