Closed MitkoTschimev closed 1 year ago
Ok just figured out that the Cupertino widget is just working different....
For those who have the same problem ->
@override
Widget build(BuildContext context) {
return PlatformTabScaffold(
iosContentPadding: true,
material: (context, platform) => MaterialTabScaffoldData(
bodyBuilder: (context, index) => IndexedStack(
index: _currentIndex,
children: [
Beamer(
routerDelegate: _routerDelegates[0],
),
Beamer(
routerDelegate: _routerDelegates[1],
),
],
),
),
cupertino: (_, __) => CupertinoTabScaffoldData(
bodyBuilder: (context, index) => Beamer(
routerDelegate: _routerDelegates[index],
),
),
tabController: tabController,
appBarBuilder: (_, index) => PlatformAppBar(
title: Text("${tabs[index].label}"),
cupertino: (_, __) => CupertinoNavigationBarData(
title: Text("${tabs[index].label}"),
),
),
items: tabs,
);
}
Hi,
I have a problem that the bodyBuilder widget from the PlatformTabScaffold is getting rendered multiple times when I use a router like beamer or go. The following problem ends in a
Multiple widgets used the same GlobalKey
exception.You can see in the picture the result after switching the tabs on android and iOS. Android is working as expected but not iOS.
I found this issue but I don't think it is related.
This is the code:
When I inspect there is also a difference where the tab bar belongs and I guess thats the issue: