Circular progress button based on hold (flutter)

前端 未结 2 1320
忘掉有多难
忘掉有多难 2021-01-13 08:39

I\'m trying to make a button where when user hold it, there will be a progress, but if the user unpress the button before it finish, the progress will decrease. somthing lik

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 08:48

    Use GestureDetector.

    Start the progress in onTapDown and reverse the progress in onTapUp if the progress is not complete or whatever your conditions are.

提交回复
热议问题