Skip to content

Commit 597df3f

Browse files
Update readme.md
1 parent 4221701 commit 597df3f

File tree

1 file changed

+107
-18
lines changed

1 file changed

+107
-18
lines changed

code_plugins/readme.md

Lines changed: 107 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,118 @@
1-
# 简单的使用说明
1+
# README
22

3+
[English](https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/readme.md)|[中文文档](https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/README-CN.md)
34

4-
## ▶【提示:】更多详细的图文使用详细讲解,请看我的博客:[Flutter代码模板,解放双手,提高开发效率必备](https://www.jianshu.com/p/4184745d6983)
5+
---
56

6-
----
7+
> Some Friends who use Flutter have a question, whether Android Studio or Intellij IDEA, they are not many of the shortcuts .Some friends are using the VSCode, maybe you can find the plugin to use, but it is not helpful for you. When you write some codes that you use every day, you can't use the shortcut to generate the code you want. So I wrote the common Flutter code live templates, and then you can use it in Android Studio, Intellij IDEA and VSCode.
78
8-
### 一、对于AS或者IDEA用户来说,只需要下载settings.jar就可以了。点击`File`--> `Import Settings`,选择`settings.jar`导入。
9+
### 1.Precautions
910

10-
> **注意事项:**
11+
* 1.Do not make any changes to the settings.jar file, otherwise please re-download the settings.jar flie.
12+
* 2.After importing, if the shortcut is not working, please check whether the code completions are correct in Android Studio or Intellij IDEA.
1113

12-
```
13-
1.不要对该文件进行任何修改,如果改坏了导入不进去或者导入之后无法正常使用,请重新下载settings.jar就可以了。
14-
2.导入之后,如果发现快捷键无法正常使用,请看看你的AS或者IDEA的代码提示匹配设置是否正常。
15-
16-
设置模糊匹配的步骤:
17-
点击菜单栏File --> Settings --> Editor --> General --> Code Completion -->
18-
在 Case sensitive completion 后面的选项改成NONE:进行模糊匹配。(First Letter:根据首字母进行匹配)
19-
```
20-
----
2114

22-
### 二、对于VSCode用户来说,请下载`dart.json`文件,然后复制到`C:\Users\Administrator\AppData\Roaming\Code\User\snippets`目录里面即可,如已经存在,请替换就OK。 Mac用户,请复制到`/Library/Application Support/Code/User/snippets/`目录里面。
15+
---
2316

17+
### 2.Set the fuzzy match:
2418

25-
----
19+
> old version
20+
Click menu bar `File → Settings → Editor → General → Code Completion → Case Sensitive Complete → NONE`
2621

27-
更多精彩请打开微信搜索并关注公众号 `Flutter那些事`,或者扫描一下二维码关注公众号。
22+
![](https://upload-images.jianshu.io/upload_images/6098829-183dce2a0499b0d6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/702/format/webp)
2823

29-
![](https://github.com/AweiLoveAndroid/Flutter-learning/raw/master/pics/%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81.jpg?raw=true)
24+
> new version
25+
26+
Click menu bar `File → Settings → Editor → General → Code Completion → Delete the check button in front of the Match cases`
27+
28+
![](https://upload-images.jianshu.io/upload_images/6098829-3194305ecb760fbe.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/556/format/webp)
29+
30+
---
31+
32+
### 3.How to import a project?
33+
34+
> Import into Android Studio or Intellij IDEA
35+
36+
First open github [https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/settings.jar](https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/settings.jar) and download the settings.jar file. The jar flie can be placed in any English file path.
37+
Then, click the menu bar `File → Import Settings`, then find the `Settings.jar` that you had downloaded and import it.
38+
39+
![](https://upload-images.jianshu.io/upload_images/6098829-450d5f8e17341ba7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/270/format/webp)
40+
41+
Then select the `live template` and `live template (schemes)` and click the `OK` button.
42+
43+
![](https://upload-images.jianshu.io/upload_images/6098829-5a16c2468a36d9d8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/541/format/webp)
44+
45+
> Import into VSCode
46+
47+
For VSCode users, download the [https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/dart.json](https://github.com/AweiLoveAndroid/Flutter-learning/blob/master/code_plugins/dart.json) file and copy it to `C:\ Users\ Administrator \ AppData \ Roaming \ Code \ User \ Snippets \ directory (user is the username in the computer)`. If the file `dart.json` already exists, please replace it.
48+
49+
---
50+
51+
4.Supported shortcuts
52+
53+
Short keys|Description
54+
----|----
55+
bab| Create AnimatedBuilder
56+
bu| Create Build()
57+
bufb| Create FutureBuilder
58+
bulb| Create LayoutBuilder
59+
buob| Create OrientationBuilder
60+
bustf| Create StatefulBuilder
61+
bustr| Create StreamBuilder
62+
cc| Create CustomClipper
63+
cen| Create Center
64+
col| Create Column
65+
con| Create full Container
66+
cp| Create your CustomPainter
67+
csv| CustomScrollView + SliverPadding and its child with padding.
68+
csv2| use CustomScrollView + SliverGrid
69+
gv| Create GridView.count
70+
inh| Create Inherited
71+
lv| Create normal ListView
72+
lvb| Create ListView.builder
73+
lvd |Create ListView with divider
74+
lvr| Create RadioListTile
75+
lvt| Create ListView with more ListTile
76+
mainstf |Create StatefulWidget
77+
mainstl| Create StatelessWidget
78+
me |Create methods
79+
mep| Create private methods
80+
row| Create Row
81+
sb |Create SizedBox
82+
ssv| Create SingleChildScrollView
83+
stanim| Create Stateful(with AnimationController)
84+
stf |Create full StatefulWidget with full lifecycle
85+
stl |Create StatelessWidget
86+
svc |Create CustomScrollView
87+
te| Create normal Text
88+
89+
---
90+
91+
5.Some shortcuts usage
92+
93+
mainstf:
94+
95+
![](https://upload-images.jianshu.io/upload_images/6098829-a715d299b3c4d2b6.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/418/format/webp)
96+
97+
mainstl:
98+
99+
![](https://upload-images.jianshu.io/upload_images/6098829-2042bdf5fb3a157a.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/418/format/webp)
100+
101+
stf:
102+
103+
![](https://upload-images.jianshu.io/upload_images/6098829-7e796ef45a0d5cd6.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/418/format/webp)
104+
105+
stl:
106+
107+
![](https://upload-images.jianshu.io/upload_images/6098829-b1549c03b9a9b5ee.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/418/format/webp)
108+
109+
gv:
110+
111+
![](https://upload-images.jianshu.io/upload_images/6098829-6c5985388f267fdc.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/647/format/webp)
112+
113+
lv:
114+
115+
![](https://upload-images.jianshu.io/upload_images/6098829-04f30b3523027724.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/418/format/webp)
116+
117+
con:
118+
![](https://upload-images.jianshu.io/upload_images/6098829-374bb9d45ba2e3ea.gif?imageMogr2/auto-orient/strip%7CimageView2/2/w/647/format/webp)

0 commit comments

Comments
 (0)