Her*_*man 5 android-studio flutter
我正在将 Android Studio 用于我的 Flutter 程序,并且我想包含一个类似于Flutter Gallery 应用程序所做的 dart 文件,以便我将其用作资产而不是它作为我程序的一部分。我怎样才能做到这一点?一种解决方法是使用像“txt”这样的文件扩展名而不是“dart”,但这不是很好。
我尝试通过右键单击文件将文件标记为纯文本,但没有帮助。我可以忍受错误警告,但如果无法编译该文件(如下所示),Android Studio 不允许我重新加载程序。
有一个选项 analysis_options.yaml
analyzer:
exclude:
- "path/to/the/file/to/exclude.dart"
- "or/pattern/**/*.dart
Run Code Online (Sandbox Code Playgroud)
但它还没有完全工作。
有关
更多详细信息,请参阅
https://github.com/dart-lang/sdk/issues/34053
https://github.com/dart-lang/sdk/issues/25551
。
归档时间: |
|
查看次数: |
1858 次 |
最近记录: |