@@ -2,15 +2,14 @@ import * as React from 'react';
22import { Text , StatusBar , Button , StyleSheet } from 'react-native' ;
33import { NavigationContainer } from '@react-navigation/native' ;
44import { createStackNavigator } from '@react-navigation/stack' ;
5- import { SafeAreaProvider } from 'react-native-safe-area-context' ;
6- import SafeAreaView from 'react-native-safe-area-view' ;
5+ import { SafeAreaProvider , SafeAreaView } from 'react-native-safe-area-context' ;
76
87function Screen1 ( { navigation } ) {
98 return (
109 < SafeAreaView style = { [ styles . container , { backgroundColor : '#6a51ae' } ] } >
1110 < StatusBar barStyle = "light-content" backgroundColor = "#6a51ae" />
12- < Text style = { { color : '#fff' } } > Light Screen</ Text >
13- < Button title = "Next screen" onPress = { ( ) => navigation . navigate ( 'Screen2' ) } color = "#fff " />
11+ < Text style = { { color : '#fff' } } > Dark Screen</ Text >
12+ < Button title = "Next screen" onPress = { ( ) => navigation . navigate ( 'Screen2' ) } color = "#000 " />
1413 </ SafeAreaView >
1514 ) ;
1615}
@@ -19,7 +18,7 @@ function Screen2({ navigation }) {
1918 return (
2019 < SafeAreaView style = { [ styles . container , { backgroundColor : '#ecf0f1' } ] } >
2120 < StatusBar barStyle = "dark-content" backgroundColor = "#ecf0f1" />
22- < Text > Dark Screen</ Text >
21+ < Text > Light Screen</ Text >
2322 < Button title = "Next screen" onPress = { ( ) => navigation . navigate ( 'Screen1' ) } />
2423 </ SafeAreaView >
2524 ) ;
0 commit comments