Skip to content

Regarding Flutter + Flutter Web packages not being recognized on pub.dev #3277

@luanpotter

Description

@luanpotter

I just uploaded a new version of the package audioplayers including the flutter web files.

However, pub does not like the web files:

See: https://pub.dev/packages/audioplayers#-analysis-tab-

Fix lib/audioplayers_web.dart. (-95.82 points)
Analysis of lib/audioplayers_web.dart failed with 11 errors, 2 hints, including:
line 3 col 8: Target of URI doesn't exist: 'dart:web_audio'.
line 8 col 7: Undefined class 'AudioContext'.
line 8 col 32: The function 'AudioContext' isn't defined.
line 17 col 3: Undefined class 'AudioBuffer'.
line 18 col 3: Undefined class 'AudioBufferSourceNode'.

I also find it weird that I have to add the audioplayer_web.dart file inside the lib folder. All other platforms have dedicated folders outside the lib folder. This file is the implementation for web, should be placed on a web folder outside the lib folder, just like ios, android and macos. However when I do that, I cannot properly run the example app on web.

Can you give me some directions on how to proceed? Having such a low score on pub is not desirable, I'm sure there is a way to configure everything properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions