flutter_blobs icon indicating copy to clipboard operation
flutter_blobs copied to clipboard

After animation, blobs reset position in a jarring way.

Open rfitz123 opened this issue 4 years ago • 3 comments

Ever since Flutter 1.20.0, the blobs which before had no issues will "reset" to what seems like a random position at the end of the time set for a Blob.animatedRandom(), which creates a very jarring effect. My workaround has been to increase the duration so the "reset" is not seen, but this makes the movement of the blob imperceptible. No changes were made to the code since its implementation, so it seems to be something stemming from a Flutter update. I can provide a screen recording of the behavior if that would be helpful. Thanks.

rfitz123 avatar Oct 07 '20 07:10 rfitz123

Having the same issue on animateFromId. All the transitions are glitchy & feels like it only animates to half the duration and then suddenly replaces the next one. Tried playing around with different duration settings but didn't seem to help.

dk-crazydiv avatar Sep 09 '21 02:09 dk-crazydiv

Check that you are not modifying the const animationTimeDilation in your project. Seems like this package uses Timers and Animations in combination while only the latter is affected by the above mentioned modification. Hence the inconsistencies. ( Line 112 in blobs.dart , to be precise )

fior-di-latte avatar Oct 07 '22 15:10 fior-di-latte

I'm also seeing the jarring animation. I have it looping and I'd expect the duration to be how long it goes from one shape to the next. But it transitions immediately.

Here is my code

 Blob.animatedRandom(
                  loop: true,
                  debug: true,
                  minGrowth: 9,
                  edgesCount: 7,
                  duration: Duration(milliseconds: 1500),
                  size: 300,
                  styles: BlobStyles(
                    color: Colors.white,
                    fillType: BlobFillType.stroke,
                    strokeWidth: 3,
                  ),
                ),

And the video:

https://user-images.githubusercontent.com/1782467/214994082-e6d77f98-d0d1-400c-9abf-74a0f2494e6c.mp4

[UPDATE] I ended up using the inspiration example. Would be cool if this was added to the api

https://github.com/lokesh-coder/flutter_blobs/blob/master/example/lib/examples/inspirations/rotate.dart

kvenn avatar Jan 27 '23 01:01 kvenn