audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

unable to access "AudioPlayer.logEnabled" in version 0.20.1

Open daoxve opened this issue 3 years ago • 1 comments

I'm currently unable to access the AudioPlayer.logEnabled setter in pub version 0.20.1 of this package. I initially thought it was just an issue from my end, but I ran flutter pub get multiple times and it still didn't work.

I do not get why this is happening, and there is nothing in your changelogs/docs on pub.dev to explain this.

You can reproduce this by updating to the latest version of the package and trying to assign a variable to the AudioPlayer logEnabled property.

the pubspec.yaml file: image

the code: image

Platforms List in detail here all the platforms that you have tested, indicating which platforms the error occurs on. Please try to test on as many different platforms as possible to make our lives easier (this is optional). You must add at least one platform in which the problem occurs (evidently). For each platform listed, you must specify:

  • OS: linux (elementary os)
  • OS version: eOS 6.1 (Jólnir)
  • Device: android emulator. (android 9.0)
  • flutter version: 2.8.1
  • audioplayers version: 0.20.1.
  • does the error occur and does it have any peculiarities: I just tested and it works when I downgrade to version 0.19.0. I still want to know how I can resolve this on the latest version though, I'm not really a fan of working with older versions of packages.

daoxve avatar Jan 06 '22 17:01 daoxve

That API was removed here and the docs weren't updated: https://github.com/bluefireteam/audioplayers/commit/6971f84106fab298fe7dea7abb924bafd710c29c

You can instead use this: Logger.changeLogLevel(LogLevel.INFO);

mihaibulic avatar Feb 23 '22 20:02 mihaibulic