I am create an app that allow users to record videos and want to create a record button similar to tiktok, I have already create the prerecord button but I don't know how to add the animation.
Widget recordbutton() {
return Container(
width: 80,
height: 80,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
width: 4, color: !isRecording ? Colors.white : Colors.red),
),
child: Container(
margin: EdgeInsets.all(8),
width: 40,
height: 40,
decoration: BoxDecoration(
color: !isRecording ? Colors.white : Colors.red,
borderRadius: BorderRadius.circular(30),
),
),
);}
On long press the button should animate like the gif below
