shounakmulay / Telephony

Flutter plugin for telephony features like query device sms directory, listen for incoming messages, retrieve various network parameters, etc.
https://telephony.shounakmulay.dev
MIT License
138 stars 126 forks source link

Error with Flutter 3.0 #141

Closed mbelelebohang-pm closed 2 years ago

mbelelebohang-pm commented 2 years ago
image

I have just upgraded to flutter 3.0 and I am getting this error from this package. Any ideas how to solve this?

MonsieurZbanowanYY commented 2 years ago

same issue

Jacques66 commented 2 years ago

Same here

Addendum: temporary solution

(kinda quick & dirty diy, because I need to advance in my project, so this is at your own risk as I'm not an expert in either kotlin or the telephony plug-in).

I edited SmsMethodCallHandler.kt (complete path is in your error message), line 357 (for me).

Simply removed the question marks.

From: override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>?, grantResults: IntArray?): Boolean { To: override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray): Boolean {

For me, it compiles and runs. When this source file is refreshed (not often), this change needs to be applied again, but this is a small price, until a permanent solution appears.

hatch01 commented 2 years ago

Jacques66's solution worked for me !

shounakmulay commented 2 years ago

Checkout https://pub.dev/packages/telephony/versions/0.2.0

mbelelebohang-pm commented 2 years ago

Thanks @shounakmulay and @Jacques66