ajinasokan / flutter_displaymode

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

Package uses or overrides a deprecated API. #14

Closed hectorAguero closed 1 year ago

hectorAguero commented 2 years ago

So, that's the log when I run the app, I don't see the issue here.

android/src/main/java/com/ajinasokan/flutterdisplaymode/DisplayModePlugin.java uses or overrides a deprecated API.

Also, is this plugin still a need for a high refresh rate in android? flutter doesn't have plans to integrate this directly in the framework, because the issue is closed? but iOS currently have the same problem, https://github.com/flutter/flutter/issues/90675

ajinasokan commented 2 years ago

That warning won't cause any issue. It will just be a no-op in unsupported SDKs.

This library is still required in phones manufactured by many OEMs. Their heuristics are based on the display mode flags set by the app. For flagship models that come with LTPO panels there are different heuristics. In some devices app works fine without this library eg: Pixel.

Currently the work is done for iOS ProMotion support because the heuristics and APIs are well defined. I'm not sure if Flutter team will work on this for Android as well.

TamasBarta commented 1 year ago

Hey @ajinasokan, what do you think about suppressing that warning? This clutters the console output when I build out app. Sure, not a big deal, but if you're certain it won't cause any issues, consider suppressing it. In case that deprecated stuff gets removed, that should result in compile-time errors anyway, so you're not making app devs ship faulty apps.

ajinasokan commented 1 year ago

@TamasBarta makes sense. I will have a look at it.

ajinasokan commented 1 year ago

Fixed in flutter_displaymode: 0.5.0