我有一组集成测试,包括图像文本识别和用户交互。对于测试,我使用静态图像而不是相机输入。我已包含这些图像,以便assets能够通过 访问测试中的图像rootBundle。但现在,这些将包含在应用程序的生产版本中。
如何添加仅用于测试的资产?
flutter:
assets: #I need those to be bundled for tests but not for production build
- ./test/resources/
- ./test/resources/barcodes/
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
151 次 |
| 最近记录: |