简体   繁体   English

如何使用 android 工作室生成的评论将 dart 文件保存在文件系统中?

[英]How to save dart file in file system with android studio generated comments?

I like how Android Studio and Visual Studio , generate the comments for each closing brackets, but when I open the same file in notepad++ or any other text editor, I don't see those comments.我喜欢Android StudioVisual Studio为每个右括号生成注释的方式,但是当我在notepad++或任何其他文本编辑器中打开同一个文件时,我看不到这些注释。 Is there a way to generate the saved dart file so it has those comments stored as part of the text code( in comment)?有没有办法生成保存的 dart 文件,以便将这些注释存储为文本代码的一部分(在注释中)?

Here is one code example that how code looks in android studio.这是一个代码示例,说明代码在 android 工作室中的外观。

它在 Android Studio 中的外观

but when opened with notepad it does not have the comment MaterialApp .但是当用记事本打开时,它没有注释MaterialApp I am guessing there is some settings in android studio that will let me save file with generated comments, so it can be useful outside of Android studio like in git etc.我猜 android 工作室中有一些设置可以让我用生成的评论保存文件,所以它在 Android 工作室之外很有用,比如 git 等。

实际文件内容

These comments are generated "on the fly" by the Flutter plugin for Android Studio.这些注释由 Android Studio 的 Flutter 插件“即时”生成。 At no time, these comments are inserted into your source files.在任何时候,这些注释都不会插入到您的源文件中。 They are just shown within the IDE.它们仅在 IDE 中显示。 So I think there is no way to "export" these comments.所以我认为没有办法“导出”这些评论。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM