Reuse the beautiful animated widgets with less effort
CircularProgressButton(
height: 55,
width: 200,
borderRadius: 30,
backgroundColor: Colors.lightBlueAccent,
fadeDurationInMilliSecond: 400,
text: "Sign In",
fontSize: 30,
progressIndicatorColor: Colors.pinkAccent,
onTap: (reset) {
makeRequest(reset);
},
)
# reset state once validation error or network fails
void makeRequest(Function reset) {
Future.delayed(Duration(seconds: 3), () {
reset();
});
}
You can read further more detail about implementation over this article.