Created
January 14, 2020 14:50
-
-
Save azamsharp/d02ed8d24809c435e4e4b129eb9f3e01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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