File tree Expand file tree Collapse file tree
modules/ensemble/lib/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,7 +272,12 @@ class TabBarState extends BaseTabBarState {
272272 // https://stackoverflow.com/questions/55425804/using-builder-instead-of-statelesswidget
273273 Widget tabContent = Builder (
274274 key: UniqueKey (),
275- builder: (BuildContext context) => buildSelectedTab ());
275+ builder: (BuildContext context) {
276+ if (widget._controller.persistentTabBar) {
277+ return SingleChildScrollView (child: buildSelectedTab ());
278+ }
279+ return buildSelectedTab ();
280+ });
276281 if (isExpanded) {
277282 tabContent = Expanded (child: tabContent);
278283 }
@@ -285,21 +290,7 @@ class TabBarState extends BaseTabBarState {
285290 // is sub-optimal since it recreates the tab content on each pass.
286291 // This means onLoad API may be called multiple times in debug mode
287292
288- widget._controller.persistentTabBar
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- ))
302- : tabContent,
293+ tabContent,
303294
304295 // This cause Expanded child to fail
305296 // Padding(
You can’t perform that action at this time.
0 commit comments