SimformSolutionsPvtLtd / flutter_credit_card

A credit card widget for Flutter application.
https://pub.dev/packages/flutter_credit_card
MIT License
431 stars 262 forks source link

[Android] Fix nullable sensor issue in GyroscopeStreamHandler #169

Open WaleedAlrashed opened 3 months ago

WaleedAlrashed commented 3 months ago

What was the issue ? The issue occurred when running the project with this package added on Flutter Channel stable 3.24.1

Trace:

Note: Recompile with -Xlint:deprecation for details.
file:///Users/waleed/.pub-cache/hosted/pub.dev/flutter_credit_card-4.0.1/android/src/main/kotlin/com/simform/flutter_credit_card/gyroscope/GyroscopeStreamHandler.kt:18:35 Function 'getValue' of property delegate is expected to return 'android.hardware.Sensor', but returns 'android.hardware.Sensor?'.

Running on debug/release produced the same issue

Disclaimer: I'm not a Kotlin expert, applied the fix so I can continue working on my project, therefore Any suggestions/changes are welcome