Mindinventory / animated_icons

This package supports an animated icon with some customization. It includes an icon type, animation as well as onTap() parameters through the user to get the values as per the requirements.
https://www.mindinventory.com/flutter-app-development.php
MIT License
17 stars 11 forks source link

Continue animation on click? #1

Closed behiunforgiven closed 2 years ago

behiunforgiven commented 2 years ago

How to implement continue animation on click?

aespatelmi commented 2 years ago

You need to pass IconType.continueAnimation in iconType parameter.

                AnimateIcon(
                      key: UniqueKey(),
                      onTap: () {},
                      iconType: IconType.continueAnimation,
                      height: 70,
                      width: 70,
                      color: Color.fromRGBO(
                          Random.secure().nextInt(255),
                          Random.secure().nextInt(255),
                          Random.secure().nextInt(255),
                          1),
                      animateIcon: AnimateIcons.bell ,
                    ),
behiunforgiven commented 2 years ago

I think this code implements playing animation from the beginning. I want a stopped animation, but when I tap, it starts playing.

mi-ghanshyam commented 2 years ago

You have to change the property iconType from onlyIcon to continueAnimation at run time. Don't forget to remove UniqueKey in constrture.