hnvn / flutter_shimmer

A package provides an easy way to add shimmer effect in Flutter project
BSD 3-Clause "New" or "Revised" License
1.77k stars 200 forks source link

dispose of controller status listener #51

Closed jayjah closed 1 month ago

adrinr commented 2 years ago

This PR is fixing performance issues on the web. Without this using it on web just hangs, could it be checked and merge if good?

hasanm08 commented 1 month ago

@adrinr @hnvn @mdeandrea-mrmilu @vasilich6107 merge please

hnvn commented 1 month ago

We actually don't need to call removeStatusListener because dispose method of AnimationController already took care of cleaning all listeners for us. You can see it in codes of dispose function: https://api.flutter.dev/flutter/animation/AnimationController/dispose.html

hasanm08 commented 1 month ago

We actually don't need to call removeStatusListener because dispose method of AnimationController already took care of cleaning all listeners for us. You can see it in codes of dispose function: https://api.flutter.dev/flutter/animation/AnimationController/dispose.html

I checked both his branch and your latest version in his version flutter html web renderer issue fixed but in version 3.0.0 still exists try

dependency_overrides:
  shimmer:
    git:
      url: https://github.com/jayjah/flutter_shimmer.git
      ref: master
hasanm08 commented 1 month ago

75