Skip to content

Instantly share code, notes, and snippets.

@kishan2612
Created December 29, 2018 15:09
Show Gist options
  • Save kishan2612/b198707c1831d843418f5f9243630452 to your computer and use it in GitHub Desktop.
Save kishan2612/b198707c1831d843418f5f9243630452 to your computer and use it in GitHub Desktop.
startanimation
void _startAnimation(AnimationController _controller) {
_controller.fling(
velocity:isBackpanelVisible(widget._controller) ? -1.0 : 1.0);
}
bool isBackpanelVisible(AnimationController _controller) {
final AnimationStatus status =_controller.status;
return status == AnimationStatus.completed ||
status == AnimationStatus.forward;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment