Skip to content

Commit ed51255

Browse files
Muhammad UsmanCopilot
andcommitted
feat(tab): fix persistentTabBar behavior with listview
Co-authored-by: Copilot <copilot@github.com>
1 parent bbafb0d commit ed51255

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

modules/ensemble/lib/layout/tab_bar.dart

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,19 @@ class TabBarState extends BaseTabBarState {
286286
// This means onLoad API may be called multiple times in debug mode
287287

288288
widget._controller.persistentTabBar
289-
? Expanded(
290-
child: SingleChildScrollView(
291-
child: tabContent))
289+
? (isExpanded
290+
? Expanded(
291+
child: Builder(
292+
key: UniqueKey(),
293+
builder: (BuildContext context) =>
294+
SingleChildScrollView(child: buildSelectedTab()),
295+
),
296+
)
297+
: Builder(
298+
key: UniqueKey(),
299+
builder: (BuildContext context) =>
300+
SingleChildScrollView(child: buildSelectedTab()),
301+
))
292302
: tabContent,
293303

294304
// This cause Expanded child to fail

0 commit comments

Comments
 (0)