aagarwal1012 / Animated-Text-Kit

🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]
https://animated-text-kit.web.app
MIT License
1.65k stars 305 forks source link

Good Library but doesn't seem to work with obx and getx #249

Closed syleishere closed 2 years ago

syleishere commented 3 years ago
             child: Obx(() => AnimatedTextKit(
                  animatedTexts: [
                    ColorizeAnimatedText(
                      "${c.song0.value}",
                      textStyle: colorizeTextStyle,
                      colors: colorizeColors,
                    ),
                  ],
                  isRepeatingAnimation: true,
                  onTap: () {
                    print("Tap Event");
                  },
                ),
              ),

Doesn't update the text at all.

syleishere commented 3 years ago

Maybe doesn't support it not sure, not sure why wouldn't work with #3 top plugin in world getx for state management.

SirusCodes commented 3 years ago

@syleishere I don't think there should be any issue with any of the state management solutions as all of them play by the rules of Flutter (IFAIK lemme know if GetX is different). Maybe you can give us some logs or some specific issue with the package then we can work on it.

TBH, I have 0 experience with GetX so it would be great if you can provide us with a project to reproduce this.

anggaaryas commented 3 years ago

Maybe related to this?

243

247

SirusCodes commented 3 years ago

Oh @aagarwal1012 have you tested this https://github.com/aagarwal1012/Animated-Text-Kit/pull/243#issuecomment-829043893?? I think this will fix it and we won't require any workaround for it🤔

awhitford commented 3 years ago

@syleishere Try adding a key like this:

             child: Obx(() => AnimatedTextKit(
                  key: ValueKey(c.song0.value),
                  animatedTexts: [
                    ColorizeAnimatedText(
                      "${c.song0.value}",
                      textStyle: colorizeTextStyle,
                      colors: colorizeColors,
                    ),
                  ],
                  isRepeatingAnimation: true,
                  onTap: () {
                    print("Tap Event");
                  },
                ),
              ),
aagarwal1012 commented 2 years ago

Closing this comment, as the issue seems to be resolved.