Search code examples
flutterdartanimationborder

Flutter - How to create a wiggly animation?


I am new to flutter and I am trying to create something like this:

enter image description here

It doesn't have to be exactly like this but something similar and more importantly, easy to implement, is what I am looking for.

I don't even know where to start.


Solution

  • Use blobs

    Create an animated blob like this

    Blob.animatedRandom(
     size:200,
     edgesCount:5,
     minGrowth:4,
     duration:  Duration(milliseconds:500),
     styles:  BlobStyles(
     color:  Colors.red,
     fillType:  BlobFillType.stroke,
     strokeWidth:3,
     ),
    ),
    

    Wrap it with an animated container and rotate it in loops. Adjust values as required. You can also use it in a stack to achieve results as shown in the question.