Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created January 14, 2020 14:50
Show Gist options
  • Save azamsharp/d02ed8d24809c435e4e4b129eb9f3e01 to your computer and use it in GitHub Desktop.
Save azamsharp/d02ed8d24809c435e4e4b129eb9f3e01 to your computer and use it in GitHub Desktop.
Positioned(
bottom: 0,
child: AnimatedContainer(
height: _expanded ? 800 : 210,
duration: Duration(milliseconds: 500),
curve: Curves.easeInOut,
child: NewsList(
articles: vm.newsArticles,
onHeaderTapped: () {
setState(() {
_expanded = !_expanded;
});
},
onDragUpdate: (details) {
if(details.primaryDelta < 0) {
setState(() {
_expanded = true;
});
} else {
setState(() {
_expanded = false;
});
}
}),
),
)
]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment