google / flutter.plugins

BSD 3-Clause "New" or "Revised" License
117 stars 55 forks source link

Background buttons are disable on IOS #110

Closed felixferr closed 3 years ago

felixferr commented 3 years ago

version : audiofileplayers 2.0.0 test on platform : ios

Hi, i have an error with null safety on line 225 from the audio_system.dart file "Unhandled Exception: type 'List<String?>' is not a subtype of type 'List' in type cast". So when i make change on this file to List<String?> the background buttons appears but they are not functional. Can i have help please ? Thx

monkeyswarm commented 3 years ago

Is this with the example app, or your own custom code? What version of iOS?

Sent from my iPhone

On May 22, 2021, at 2:14 AM, felixferr @.***> wrote:

 version : audiofileplayers 2.0.0 test on platform :

Hi, i have an error with null safety on line 225 from the audio_system.dart file "Unhandled Exception: type 'List<String?>' is not a subtype of type 'List' in type cast". So when i make change on this file to List<String?> the background buttons appears but they are not functional. Can i have help please ? Thx

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

felixferr commented 3 years ago

Hi, it's my custom code, on ios 14.2

monkeyswarm commented 3 years ago

Is this a compile-time error or runtime error? I am not able to reproduce this when I run the example app. Does the example app work as expected for you?

Are you sure you are calling setSupportedMediaActions with a "Set\" (Not a "Set<MediaActionType?>" nor "Set\?"). Check the runtime type of your [actions] parameter.

felixferr commented 3 years ago

It's a runtime error. Your example not use null safety... And I watched the part where I declared MediaActionType and i use "Set without "?"

monkeyswarm commented 3 years ago

I've updated my example to use null safety and have reproduced the problem.

monkeyswarm commented 3 years ago

Ok a fix is pushed to github and also to pub.dev as version 2.0.1. Please try it and let me know of any issues.