[device_info_plus]: According to package analysis, device_info_plus 8.1.0 is not Web compatible?? #1651
Closed
7 tasks done
Labels
question
Further information is requested
What is your question?
I want my Dart package, fluttery framework, to be Web-compatible, but it appears device_info_plus is preventing this.
When I publish it to Pub.dev, the package analysis states it's not Web compatible.
However, it's device_info_plus itself that imports device_info_plus_linux which eventually imports dart:io.
dart:io is not Web compatible! (see Platform support).
That's beyond my control! Is it not?
And so my question is, how can I use device_info_plus and be Web-compatible at the same time?
I'm importing the plus plugin in the following file:
package:fluttery_framework/src/controller/device_info.dart
When the app starts up, the plugin is then called:
Possible Solution
I was looking through the source code:
Would introducing a conditional import on the 'linux' file as well as the 'Windows' file be helpful:?:
This will allow device_info_plus to be used and supported on all 6 platforms.
Package Analysis
Platform support
System Info
package: fluttery framework
plugin: device_info_plus 8.1.0
flutter doctor -v
Steps to Reproduce
Publishing with the latest version of device_info_plus.
Expected results: 20/20 points: Supports 6 of 6 possible platforms
Actual results: 20/20 points: Supports 5 of 6 possible platforms
Please, I am at a loss. What am I missing here?
Checklist before submitting a question
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: