Color Scheme in React Native
Change color based on user preference
It is sometimes necessary that we change our app screen based on user color choice. react usecolor scheme helps us acheive this.
first you have to import using "import {useColorScheme} from 'react-native';
store user preference in #react-native by setting boolean variable as below
const isdark = useColorScheme();
now you can check if the user screen is in dark mode like
isdark === 'dark';
and change style based on above variable.