By using the screen brightness or screen package I am able to change the screen brightness of the mobile phone but the changed brightness is not reflected in the device brightness slider and the mobile adjusts to device brightness after coming out of the application.
Is there a way to write the brightness of the mobile phone using flutter?
We will use Screen package dependency and add to pubspec.yaml file
Add the wakelock permission in AndroidManifest.xml file
Now your main.dart file be like: