Skip to content

[BUG]: lint warning regarding PluginRegistry Depreciation #639

@christopherowen

Description

@christopherowen

What happened?

I'm receiving this error on release build with lint enabled:

/opt/homebrew/Caskroom/flutter/3.7.0/flutter/.pub-cache/hosted/pub.dev/onesignal_flutter-3.5.0/android/src/main/java/com/onesignal/flutter/OneSignalOutcomeEventsController.java:15: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/opt/homebrew/Caskroom/flutter/3.7.0/flutter/.pub-cache/hosted/pub.dev/onesignal_flutter-3.5.0/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java:42: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/opt/homebrew/Caskroom/flutter/3.7.0/flutter/.pub-cache/hosted/pub.dev/onesignal_flutter-3.5.0/android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java:43: warning: [deprecation] FlutterNativeView in io.flutter.view has been deprecated
import io.flutter.view.FlutterNativeView;
                      ^
/opt/homebrew/Caskroom/flutter/3.7.0/flutter/.pub-cache/hosted/pub.dev/onesignal_flutter-3.5.0/android/src/main/java/com/onesignal/flutter/OneSignalTagsController.java:20: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
/opt/homebrew/Caskroom/flutter/3.7.0/flutter/.pub-cache/hosted/pub.dev/onesignal_flutter-3.5.0/android/src/main/java/com/onesignal/flutter/OneSignalInAppMessagingController.java:13: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Steps to reproduce?

1. build a flutter project using onesignal with lint enabled

What did you expect to happen?

No lint warnings.

My searching on the topic lead me to this page, but I'm a little out of my depth:

https://api.flutter.dev/javadoc/io/flutter/plugin/common/PluginRegistry.html
https://docs.flutter.dev/development/platform-integration/android/plugin-api-migration

OneSignal Flutter SDK version

Release 3.5.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions