inway / flutter_ringtone_player

Simple Flutter plugin to play ringtone, alarm & notification sounds
MIT License
92 stars 57 forks source link

wrong type return on plugin #1

Closed ching631108 closed 5 years ago

ching631108 commented 5 years ago

on flutter_ringtone_player/android/src/main/java/io/inway/ringtone/player/FlutterRingtonePlayerPlugin.java:45

            if (!call.hasArgument("android")) {
                return result.notImplemented();
            }

this funcion "onMethodCall" should return void, but here return result.notImplemented();

when I use this code ,my flutter obj can't run on Android.

I tried to fix it to

            if (!call.hasArgument("android")) {
                result.notImplemented();
                return;
            }

It will work will.

I am poor with github, so I didn't know how to Pull requests. I believe other one can do it better. thanks.

SPodjasek commented 5 years ago

Thank you for this report, it should be fixed now.