We will consider how to prevent the feature of forcing the applications to dark mode, which usually appears on Xiaomi devices.
First of all, we should open \android\app\src\main\res\values path of our project. The code we will add to the styles.xml file in this directory will prevent the dark mode. So, we can open styles.xml file and add
<item name="android:forceDarkAllowed">false</item> tag into
When we build the application again, devices won’t be able to force the application to dark mode anymore.