So this is what i did today. Basically we needed to trigger some event when the button is pressed for three seconds.
To create this I've used GestureDetector. Under gesturedetector we have onTapDown Function which can be used to sense when the button was released after being pressed.
Lets dive to code.
Packages that i used to create this screen:
velocity_x: