skip to Main Content

enter image description here

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


  1. 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

    Login or Signup to reply.
  2. You can use CustomScrollView that takes a list of slivers:[], You can then place your SliverAppBar (With TabBar) and below that you can place your SliverList 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search