Closed manudicri closed 9 months ago
I get the same warning.
It seems like this cast is the cause:
To fix this, I've found that after creating a custom type (without using a generic), the compiler passes the test (https://stackoverflow.com/a/49832115) :
// your class extends generic but is not generic
class EventParameters extends Map<String, Object> { }
// then change your cast like this:
EventParameters params = (EventParameters) parameters; // here we have NO warning for unchecked cast
@rmtmckenzie What do you think about it? It might be worth updating, one warning less :)
Should be fixed in the newest release.
When building the apk of my app, this warning appears in the console.
Note: /Users/manudicri/.pub-cache/hosted/pub.dev/native_device_orientation-1.1.4/android/src/main/java/com/github/rmtmckenzie/native_device_orientation/NativeDeviceOrientationPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
That's basically it.
My
flutter doctor -v
: