ajinasokan / flutter_displaymode

A Flutter plugin to set display mode in Android
MIT License
184 stars 22 forks source link

setPreferredMode does not do anything #23

Closed milindgoel15 closed 1 year ago

milindgoel15 commented 1 year ago

So I have just implemented the flutter_displaymode in my app. I have currently used the setHighRefreshRate(); method in the root widget which works fine. But this has its own downside for users who prefer using a lower refresh rate.

In the example application provided and in the documentation, the function setPreferredMode() is there to basically set a preference for the app to use the desired mode. But according to this line:

It is upto the system to use this mode. Sometimes system can choose not switch to this based on internal heuristics.

If the system is set to 90hz and we use the setPreferredMode to set to 60hz, the active rate does not switch to 60hz and it stays on 90hz because the system is set to 90. So how can we force the app to use the preferred mode?

ajinasokan commented 1 year ago

From my experiments I have found that it is not possible. Final decision is up to the system. If the phone display settings has an Auto mode then we will be able to switch to whatever mode deterministically. Otherwise users setting is respected.

milindgoel15 commented 1 year ago

Gotcha thanks