Skip to content

feat(tab): add persistentTabBar option for keep the tab pinned#2186

Open
usmanvrtx wants to merge 1 commit intomainfrom
feat/tabbar-persistent-header
Open

feat(tab): add persistentTabBar option for keep the tab pinned#2186
usmanvrtx wants to merge 1 commit intomainfrom
feat/tabbar-persistent-header

Conversation

@usmanvrtx
Copy link
Copy Markdown
Contributor

Summary

Add persistentTabBar support so the tab bar stays pinned while only the tab content scrolls.

Key Changes

TabBar Behavior

  • Add persistentTabBar parameter to TabBar.
  • Keep the tab bar fixed at the top.
  • Scroll only the selected tab content.

Usage

  body:
    TabBar:
      styles:
        persistentTabBar: true

@usmanvrtx usmanvrtx requested a review from TheNoumanDev April 7, 2026 17:48
@usmanvrtx usmanvrtx self-assigned this Apr 7, 2026
@usmanvrtx usmanvrtx added the enhancement New feature or request label Apr 7, 2026
@usmanvrtx usmanvrtx linked an issue Apr 7, 2026 that may be closed by this pull request
tabContent

widget._controller.persistentTabBar
? Expanded(
Copy link
Copy Markdown
Member

@TheNoumanDev TheNoumanDev Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are wrapping it with Expanded widget based on persistentTabBar, and also wrapping it with Expanded when isExpanded is also true, so if we set both properties, it gets wrapped twice in Expanded widget. Can you check if using both properties breaks it or works fine?

Verify with some edge cases:

  • persistentTabBar: true + content has ListView
  • persistentTabBar: true + content has Expanded child
  • Tab content shorter than the screen, verify that it takes space as widget space or it takes extra space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support sticky/pinned TabBar with scrollable tab content

2 participants