I want to make a scroll able app bar with tabbar in bottom of sliverAppBar which will have 4 tabs with 4 different api calls with pagination how can I handle scrollable app bar and pagination with scrollcontroller for an individual tab in flutter
I have tried using nestedscrollview
2
Answers
I think you can take a look for
PageView
widget.Just use an expanded containing the
PageView
widget & implement your tabbar using the pageview controller.api.flutter.dev/flutter/widgets/PageView-class.html
You can use
CustomScrollView
that takes a list ofslivers:[]
, You can then place yourSliverAppBar
(WithTabBar
) and below that you can place yourSliverList
with pagination logic using scrollController.Please find the reference link on how to make yourself familiar with slivers in Flutter: https://docs.flutter.dev/ui/layout/scrolling/slivers
If you have any doubts on pagination logic using any state management libraries in flutter, Kindly leave a comment.