I tried setting the center tab as the initial tab but its not working. Also pressing back button from center screen takes to the left most tab and then it exits.
How to fix this behaviour.
<Tabs
initialRouteName={'home'}
screenOptions={{
tabBarShowLabel: false,
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
tabBarHideOnKeyboard: true,
headerShown: useClientOnlyValue(false, true),
tabBarLabelStyle: {
fontSize: 14,
fontWeight: 'bold',
marginBottom: 10,
},
}}>
<Tabs.Screen
name="(capture)"
options={{
title: 'Register',
headerShown: false,
tabBarIcon: ({ color }) => <TabBarIcon name="plus" color={color} />,
}}
/>
<Tabs.Screen
name="(home)"
options={{
title: 'Home',
headerShown: false,
tabBarIcon: ({ color }) => <TabBarIcon name="home" color={color} />,
}}
/>
<Tabs.Screen
name="(settings)"
options={{
title: 'Settings',
headerShown: false,
tabBarIcon: ({ color }) => (
<TabBarIcon name="settings" color={color} />
),
}}
/>
</Tabs>
I tried setting the initial route variable as ‘home’ but the behaviour when we press back button is not getting solved.