如何使用Flutter在Android Studio中进行代码折叠的区域块 [英] How to do Region Blocks for Code Folding in android studio with Flutter

查看:331
本文介绍了如何使用Flutter在Android Studio中进行代码折叠的区域块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以像这样在android studio中做区域块。

I can do region blocks in android studio like this.

//region Description

Your code here

//endregion

但是如何应对颤动呢?

推荐答案

在IntelliJ或Android Studio IDE中,您可以按照问题中的说明使用REGION折叠,效果很好。
REGION折叠也可与 // ##

In the IntelliJ or Android Studio IDE, you can use REGION folding as written in your question, works fine. REGION folding also works with //#region (both tested in the IntelliJ IDE CE 2019.3.3 and Android Studio IDE 3.4.1):

// with and without spaces after double slashes
//#region Description
Your code here
//#endregion

// #region Description
Your code here
// #endregion

此问题在GitHub

关闭主题:
如果其他人更喜欢使用VSCode,那么我可以推荐扩展名 #region VS的折叠代码。在那里,您可以根据需要配置每种语言的折叠注释。

Off topic: If someone else prefers to use VSCode then I can recommend the extension #region folding for VS Code. There you can configure the folding comment for each language as you wish.

"maptz.regionfolder": {
     "[dart]": {
         "foldStart": "// #region [NAME]", // or whatever you like, e.g.`// #some_tag#`
         ...
     }
}

这篇关于如何使用Flutter在Android Studio中进行代码折叠的区域块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆