Using ListView, DefaultTabController(and hence TabBar), and RefreshIndicator

131 views
Skip to first unread message

Alvaro Gonzalez Rico

unread,
Jun 14, 2021, 1:02:07 PM6/14/21
to Flutter Development (flutter-dev)
Hello! I am currently using a DefaultTabController that has a Scaffold whose body is a ListView. Inside the ListView, I have some children Widget: buildProfileHeader() contains a FutureBuilder; the Widget at the bottom of the ListView is an AppBar which contains the TabBar (2 tabs), and right underneath the AppBar I have a Container that has the TabBarView. Everything works perfectly, but now I want to implement something more:
  1. I want to use a RefreshIndicator (or something similar) to update the buildProfileHeader(), whenever the user wants to (when the user overscrolls)
  2. I want one of the tabs (there are 2 in total), to NOT be present if a specific condition is met (if it is NOT the profile of the current user, I do NOT want one of the tabs to appear).
How could I implement both #1 & #2?

Alvaro Gonzalez Rico

unread,
Jun 15, 2021, 9:15:14 AM6/15/21
to Flutter Development (flutter-dev)
Hello guys! Does anyone have any advice on this? I would really appreciate it. Thanks
Reply all
Reply to author
Forward
0 new messages