Skip to content

Instantly share code, notes, and snippets.

@Turskyi
Last active July 24, 2021 10:26
Show Gist options
  • Save Turskyi/3ce653fd4998898ed83aaffd6b7cd608 to your computer and use it in GitHub Desktop.
Save Turskyi/3ce653fd4998898ed83aaffd6b7cd608 to your computer and use it in GitHub Desktop.
Convenient flutter methods.
/// After 0.5 second after creating, the list will slide down
/// to the bottom of the ListView
void _animateSlideDown(Model model) {
Timer(
Duration(milliseconds: 400),
() => model.scrollController.animateTo(
model.scrollController.position.maxScrollExtent,
duration: Duration(milliseconds: 500),
curve: Curves.fastOutSlowIn,
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment