You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently using the flutter_sticky_header package in my project and I have a question regarding its functionality.
I am interested in receiving notifications when the sticky header scrolls out of the viewport. I understand that I can use a StickyHeaderController to listen to the current sticky header's scroll offset. However, I am not entirely sure how to determine when the header is out of the viewport using this controller.
Here is a snippet of my current implementation:
final controller =StickyHeaderController();
CustomScrollView(
slivers:[
// index 1SliverStickyHeader(
controller: controller,
header:Text('Header'),
sliver:SliverList(...),
),
// index 1SliverStickyHeader(
controller: controller,
header:Text('Header'),
sliver:SliverList(...),
),
]
)
controller.addListener(() {
});
In the above code, I am using the pinned property of the offset to determine if the header is out of the viewport. Is this the correct approach? If not, could you please provide some guidance on how to correctly implement this functionality?
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered:
Hello,
I am currently using the
flutter_sticky_header
package in my project and I have a question regarding its functionality.I am interested in receiving notifications when the sticky header scrolls out of the viewport. I understand that I can use a
StickyHeaderController
to listen to the current sticky header's scroll offset. However, I am not entirely sure how to determine when the header is out of the viewport using this controller.Here is a snippet of my current implementation:
In the above code, I am using the pinned property of the offset to determine if the header is out of the viewport. Is this the correct approach? If not, could you please provide some guidance on how to correctly implement this functionality?
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered: