bytepark / auto_orientation

A flutter plugin to programmatically change the orientation and rotate
MIT License
46 stars 47 forks source link

Deprecated Dependency Warning - Needs to be updated #21

Closed jbmatheson closed 2 years ago

jbmatheson commented 3 years ago

Running

minSDK = 21 targetSDK and compileSDK = 30

After installing this package my build generates the following two warnings:

/Users/jbmathes/flutter/.pub-cache/hosted/pub.dartlang.org/auto_orientation-2.0.2/android/src/main/java/de/bytepark/autoorientation/AutoOrientationPlugin.java:11: warning: [deprecation] Registrar in PluginRegistry has been deprecated import io.flutter.plugin.common.PluginRegistry.Registrar; ^ /Users/jbmathes/flutter/.pub-cache/hosted/pub.dartlang.org/auto_orientation-2.0.2/android/src/main/java/de/bytepark/autoorientation/AutoOrientationPlugin.java:18: warning: [deprecation] Registrar in PluginRegistry has been deprecated public static void registerWith(Registrar registrar) { ^ 2 warnings

There is currently no way to upgrade my flutter pub in order to upgrade this transitive dependency.

fbatschi commented 3 years ago

Yes, this is deprecation is known. https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration

auto_orientation needs to be migrated to the API of FlutterPlugin. Right now its only a warning.

HaardikBhagtani commented 3 years ago

@fbatschi getting this error Note: C:\Users\Haardik\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\auto_orientation-2.1.0\android\src\main\java\de\bytepark\autoorientation\AutoOrientationPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

fbatschi commented 2 years ago

If you use auto_orientation 2.2.0 you should no longer be getting this deprecation warning since the deprecated API use is removed.