drenther / upi_pay

Flutter plugin for UPI (Only in India)
MIT License
58 stars 71 forks source link

Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? #60

Open vsaisujeeth opened 2 years ago

vsaisujeeth commented 2 years ago

Describe the bug

Tried the example given in the page https://pub.dev/packages/upi_pay/example. Debugger throws this error.

e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (78, 42): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (83, 15): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (97, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? 
asifakhtar98 commented 2 years ago

Getting the same issue till now

drenther commented 2 years ago

Happy to take a PR for this.

drenther commented 2 years ago

If this issue concerns you still. Please have a look at https://github.com/drenther/upi_pay/pull/62 by @GJJ2019 and leave your comments on that PR. Will have merge that PR and close this issue ASAP.

Electro-17 commented 1 year ago

May I know when this issue will be fixed and the plugin will be made available for use?

cndNabeel commented 1 year ago

the issue still coming upi_pay\UpiPayPlugin.kt: (97, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? upi_pay\UpiPayPlugin.kt: (83, 15): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? upi_pay\UpiPayPlugin.kt: (78, 42): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?

sumitrvi commented 1 year ago

Any solution for this issue? Note: /Users/nhz/.pub-cache/hosted/pub.dev/launch_review-3.0.1/android/src/main/java/com/iyaffle/launchreview/LaunchReviewPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. e: /Users/nhz/.pub-cache/hosted/pub.dev/upi_pay-1.0.1/android/src/main/kotlin/com/drenther/upi_pay/UpiPayPlugin.kt: (78, 42): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? e: /Users/nhz/.pub-cache/hosted/pub.dev/upi_pay-1.0.1/android/src/main/kotlin/com/drenther/upi_pay/UpiPayPlugin.kt: (83, 15): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? e: /Users/nhz/.pub-cache/hosted/pub.dev/upi_pay-1.0.1/android/src/main/kotlin/com/drenther/upi_pay/UpiPayPlugin.kt: (97, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?