我开发了一个Flutter包multi_image_picker_view:https://pub.dev/packages/multi_image_picker_view
此软件包依赖于file_picker
和flutter_reorderable_grid_view
,它们都支持Web。但在我的软件包中,Web选项在pub.dev中不可见。即使此软件包在Web上也能正常工作。
👉* 帮我弄清楚为什么Web没有显示在pub.dev上 *
📜我的酒吧规范yaml
name: multi_image_picker_view
description: A complete widget that can easily pick multiple images from a device and display them in UI. Also picked image can be re-ordered and removed easily.
version: 0.0.6
homepage: https://github.com/shubham-gupta-16/multi_image_picker_view
repository: https://github.com/shubham-gupta-16/multi_image_picker_view
issue_tracker: https://github.com/shubham-gupta-16/multi_image_picker_view/issues
environment:
sdk: ">=2.17.1 <3.0.0"
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
flutter_reorderable_grid_view: ^3.1.3
file_picker: ^5.0.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
assets:
- packages/multi_image_picker_view/assets/close-48.png
👨💻用于发布的命令
flutter pub publish
🗃️我的火柴信息
- Flutter版本:3.0.1
- 通道:稳定
- Dart版本:2.17.1
- 集成开发环境:Android Studio花栗鼠|2021.2.1补丁程序1
🚀您可以找到完整的代码Github:https://github.com/shubham-gupta-16/multi_image_picker_view
先谢谢你。
1条答案
按热度按时间9jyewag01#
需要条件导入
这个包在
pub.dev
上不显示Web的原因是它使用了没有条件导入的dart.io
。为了解决这个问题,我将文件的使用位置分开,一个用于Web平台,一个用于非Web平台,然后根据运行平台的条件导入它们。
网页预览.dart
非网页预览.dart
我的包文件.dart