flame-engine/flame

Remove `dart:io` import to add web support tag

Closed this issue · 1 comments

What could be improved

Change the usage of dart:io elements here:

(Platform.isMacOS || Platform.isWindows || Platform.isLinux)) {

with:

[TargetPlatform.linux, TargetPlatform.macOS, TargetPlatform.windows].contains(defaultTargetPlatform)

Why should this be improved

Just looking at the package's pub.dev, I can't tell if it supports the web or not due to not having the web platform tag.

Image

By implementing the above changes, the package will get the web tag and might also get the wasm support mark. It will also improve the pub.dev score and docs for all packages / plugins that depends on this package.

Risks

No, not to my knowledge.

More information

No response

Other

  • Are you interested in working on a PR for this?

Go for it! I'll assign you to the issue. :)
Tbh I thought we had already done these changes, so good that you found that we had missed a place.