I have ListView and when I'm scrolling the list I want to show data from header which extends beyond the top of the screen in appBar. StickyHeader do not suggest. I specifically need to show information from the header in the appBar I was trying to use scrollcontroller but without success var _controller = ScrollController();
@override
void initState() {
super.initState();
// Setup the listener.
_controller.addListener(() {
if (_controller.position.atEdge) {
if (_controller.position.pixels == 0) {
// You're at the top.
} else {
// You're at the bottom.
}
}
});
}
It turns out to show something only when I return to the top of the list. But I can't find a way out of my situation to show information
from each header that is at the top of the list so I want to replace "Not sticky Example" to "Header #0", when it is on top, and when the "Header #2" is on top to show it on appBar