I am currently using Expo and React Navigation to toggle between Dark Theme and Light Theme for my app. The only issue is that I’m not able to change the status bar color on iOS based on the theme.
I have a Tab Navigator nested inside of Drawer Navigator, but I’m having trouble figuring out how to change the status bar color on iOS when I toggle the theme for all screens in the nested navigation. This is what part of my drawer navigator looks like.
<themeContext.Provider value={themeData}>
<NavigationContainer theme={theme == 'Light' ? CustomDefaultTheme : CustomDarkTheme}>
<Drawer.Navigator
screenOptions={{
headerShown: false,
swipeEdgeWidth: 0,
drawerActiveBackgroundColor: '#e8e4f0',
drawerActiveTintColor: '#8a76b6',
drawerInactiveBackgroundColor: 'transparent',
drawerInactiveTintColor: '#bcbcc1',
}}