animate method
Duration
is given in milliseconds.
..animate(400, Curves.easeInOut);
Adding a delay to your animation
.onTapDown((details) {
// change styling without a delay
thisStyle..backgroundColor(rgb(255,255,0));
// Trigger the setState with a delay
Future.delayed(Duration(milliseconds: 500)).then((_) => setState(() {}));
})
Implementation
void animate([int duration = 500, Curve curve = Curves.linear]) => _styleModel
..duration = Duration(milliseconds: duration)
..curve = curve;