Skip to content

Commit 5fbafd9

Browse files
committed
Some new minor widgets. Row, Column, Text and Container
1 parent a29d5f2 commit 5fbafd9

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ An Intellij & Android Studio plugin that adds Live Templates to your IDE saving
1212
| ---------- | ------------------------ | -------------- |
1313
|`alertDialog`|[View Docs](https://docs.flutter.io/flutter/widgets/AlertDialog-class.html)|Creates a showDialog that returns with AlertDialog|
1414
|`animBldr`|[View Docs](https://docs.flutter.io/flutter/widgets/AnimationBuilder-class.html)|Creates an AnimationBuilder|
15+
|`column`|[View Docs](https://docs.flutter.io/flutter/widgets/Column-class.html)|Creates a Column Widget|
16+
|`container`|[View Docs](https://docs.flutter.io/flutter/widgets/Container-class.html)|Creates a Container Widget|
1517
|`customClipper`|[View Docs](https://api.flutter.dev/flutter/rendering/CustomClipper-class.html)|Creates a CustomClipper|
1618
|`customPainter`|[View Docs](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html)|Creates a CustomPainter|
1719
|`customScrollV`|[View Docs](https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html)|Creates a CustomScrollView|
@@ -21,13 +23,15 @@ An Intellij & Android Studio plugin that adds Live Templates to your IDE saving
2123
|`layoutBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html)|Creates a LayoutBuilder|
2224
|`listViewBldr`|[View Docs](https://docs.flutter.io/flutter/widgets/ListView.builder.html)|Creates a ListView.builder()|
2325
|`orienatatBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/OrientationBuilder-class.html)|Creates a OrientationBuilder|
26+
|`row`|[View Docs](https://docs.flutter.io/flutter/widgets/Row-class.html)|Creates a Row Widget|
2427
|`scfAll`|[View Docs](https://docs.flutter.io/flutter/material/Scaffold-class.html)|Creates a Scaffold containing an Appbar, BottomNavigationBar and FloatingActionButton|
2528
|`scfAppBar`| |Creates a Scaffold containing an Appbar|
2629
|`scfAppBarFab`| |Creates a Scaffold containing an Appbar and Floating Action Button|
2730
|`scfAppBarBtmNav`| |Creates a Scaffold containing an Appbar and Bottom Navigation Bar|
2831
|`singleChildScrollV`|[View Docs](https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html)|Creates a SingleChildScrollView|
2932
|`streamBldr`|[View Docs](https://docs.flutter.io/flutter/widgets/StreamBuilder-class.html)|Creates a StreamBuilder|
3033
|`stfulBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/StatefulBuilder/StatefulBuilder.html)|Creates a StatefulBuilder|
34+
|`text`|[View Docs](https://docs.flutter.io/flutter/widgets/Text-class.html)|Creates a Text Widget|
3135

3236
## Plugin Supports the Following IDEs:
3337
* Android Studio

resources/META-INF/plugin.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<idea-plugin>
33
<id>com.herbert.george.flutter-snippets</id>
44
<name>Flutter Snippets</name>
5-
<version>0.1.6</version>
5+
<version>0.1.7</version>
66
<vendor>George Herbert</vendor>
77
<description><![CDATA[
88
<p>Provides live templates for Flutter to save time writing boilerplate.</p>
@@ -19,6 +19,14 @@ The following commands are supported:
1919
<tr>
2020
<td>animBldr</td>
2121
<td>Creates an AnimationBuilder</td>
22+
</tr>
23+
<tr>
24+
<td>column</td>
25+
<td>Creates a Column Widget</td>
26+
</tr>
27+
<tr>
28+
<td>container</td>
29+
<td>Creates a Container Widget</td>
2230
</tr>
2331
<tr>
2432
<td>customClipper</td>
@@ -55,6 +63,10 @@ The following commands are supported:
5563
<tr>
5664
<td>orientatBldr</td>
5765
<td>Creates a ListView.builder()</td>
66+
</tr>
67+
<tr>
68+
<td>row</td>
69+
<td>Creates a Row Widget</td>
5870
</tr>
5971
<tr>
6072
<td>scfAll</td>
@@ -83,9 +95,13 @@ The following commands are supported:
8395
<tr>
8496
<td>stfulBldr</td>
8597
<td>Creates a StatefulBuilder</td>
98+
</tr>
99+
<tr>
100+
<td>text</td>
101+
<td>Creates a Text Widget</td>
86102
</tr>
87103
</table>]]></description>
88-
<change-notes>New icon thanks to the wonderful work of https://www.domoredg.com/</change-notes>
104+
<change-notes>Some new minor widgets. Row, Column, Text and Container</change-notes>
89105
<idea-version since-build="141.0" />
90106
<depends>com.intellij.modules.java</depends>
91107
<extensions defaultExtensionNs="com.intellij">

resources/liveTemplates/Flutter.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,40 @@
152152
</context>
153153
</template>
154154

155+
<!-- Container-->
156+
157+
<template name="container" value="Container(&#10; child: $Widget$(),&#10;)" description="Create Container Widget" toReformat="true" toShortenFQNames="true">
158+
<variable name="Widget" expression="&quot;Widget&quot;" defaultValue="" alwaysStopAt="true" />
159+
<context>
160+
<option name="DART_STATEMENT" value="true" />
161+
</context>
162+
</template>
163+
164+
<!-- Row-->
165+
166+
<template name="row" value="Row(&#10; children: &lt;Widget&gt;[$goto$],&#10;)" description="Create Row Widget" toReformat="true" toShortenFQNames="true">
167+
<variable name="goto" expression="&quot;&quot;" defaultValue="" alwaysStopAt="true" />
168+
<context>
169+
<option name="DART_STATEMENT" value="true" />
170+
</context>
171+
</template>
172+
173+
<!-- Column-->
174+
175+
<template name="column" value="Column(&#10; children: &lt;Widget&gt;[$goto$],&#10;)" description="Create Column Widget" toReformat="true" toShortenFQNames="true">
176+
<variable name="goto" expression="&quot;&quot;" defaultValue="" alwaysStopAt="true" />
177+
<context>
178+
<option name="DART_STATEMENT" value="true" />
179+
</context>
180+
</template>
181+
182+
<!-- Text-->
183+
184+
<template name="text" value="Text('$text$')" description="Create Text Widget" toReformat="true" toShortenFQNames="true">
185+
<variable name="text" expression="&quot;text&quot;" defaultValue="" alwaysStopAt="true" />
186+
<context>
187+
<option name="DART_STATEMENT" value="true" />
188+
</context>
189+
</template>
190+
155191
</templateSet>

0 commit comments

Comments
 (0)