import { useColorScheme } from '@/hooks/useColorScheme'; import { Colors } from '@/theme/colors'; import { ThemeProvider } from '@/theme/theme-provider'; import { osName } from 'expo-device'; import { isLiquidGlassAvailable } from 'expo-glass-effect'; import * as NavigationBar from 'expo-navigation-bar'; import { Stack } from 'expo-router'; import * as SplashScreen from 'expo-splash-screen'; import { StatusBar } from 'expo-status-bar'; import { setBackgroundColorAsync } from 'expo-system-ui'; import React, { useEffect } from 'react'; import { Platform } from 'react-native'; import { GestureHandlerRootView } from 'react-native-gesture-handler'; import 'react-native-reanimated'; SplashScreen.setOptions({ duration: 200, fade: true, }); export default function RootLayout() { const colorScheme = useColorScheme() || 'light'; useEffect(() => { if (Platform.OS === 'android') { NavigationBar.setButtonStyleAsync( colorScheme === 'light' ? 'dark' : 'light' ); } }, [colorScheme]); // Keep the root view background color in sync with the current theme useEffect(() => { setBackgroundColorAsync( colorScheme === 'dark' ? Colors.dark.background : Colors.light.background ); }, [colorScheme]); return ( ); }