Skip to content

Commit 6b20106

Browse files
committed
Add the rest of the snippets
1 parent ae63de3 commit 6b20106

File tree

3 files changed

+262
-189
lines changed

3 files changed

+262
-189
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,36 @@ An Intellij & Android Studio plugin that adds Live Templates to your IDE saving
1313
|`alertDialog`| |Creates a showDialog that returns with AlertDialog|[View Docs](https://docs.flutter.io/flutter/widgets/AlertDialog-class.html)|
1414
|`animatedBldr`|Animated Builder|Creates an Animated Builder. The child widget is passed to the builder|[View Docs](https://docs.flutter.io/flutter/widgets/AnimationBuilder-class.html)|
1515
|`aspectRatio`| |Creates an AspectRatio|[View Docs](https://api.flutter.dev/flutter/widgets/AspectRatio-class.html)|
16+
|`build`|Build Method|Describes the part of the user interface represented by the widget.| |
1617
|`column`| |Creates a Column Widget|[View Docs](https://docs.flutter.io/flutter/widgets/Column-class.html)|
1718
|`container`| |Creates a Container Widget|[View Docs](https://docs.flutter.io/flutter/widgets/Container-class.html)|
1819
|`customClipper`|Custom Clipper|Used for creating custom shapes|[View Docs](https://api.flutter.dev/flutter/rendering/CustomClipper-class.html)|
1920
|`customPainter`|Custom Painter|Used for creating custom paint|[View Docs](https://api.flutter.dev/flutter/rendering/CustomPainter-class.html)|
2021
|`customScrollV`| Custom ScrollView|Creates a ScrollView that creates custom scroll effects using slivers. If the primary argument is true, the controller must be null.|[View Docs](https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html)|
22+
|`debugP`|Debug Print|Prints a message to the console, which you can access using the flutter tool'slogscommand (flutter logs).|[View Docs](https://api.flutter.dev/flutter/foundation/debugPrint.html)|
2123
|`dis`|Dispose|Called when this object is removed from the tree permanently. The framework calls this method when this State object will never build again.|[View Docs](https://api.flutter.dev/flutter/widgets/State/dispose.html)|
2224
|`futureBldr`|Future Builder|Creates a Future Builder. This builds itself based on the latest snapshot of interaction with a Future|[View Docs](https://docs.flutter.io/flutter/widgets/FutureBuilder-class.html)|
2325
|`initS`|InitState|Called when this object is inserted into the tree. The framework will call this method exactly once for each State object it creates.|[View Docs](https://api.flutter.dev/flutter/widgets/State/initState.html)|
2426
|`layoutBldr`|Layout Builder|Similar to the Builder widget except that the framework calls the builder function at layout time and provides the parent widget's constraints.|[View Docs](https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html)|
2527
|`listViewBldr`|ListView.Builder|Creates a scrollable, linear array of widgets that are created on demand.Providing a non-null itemCount improves the ability of the ListView to estimate the maximum scroll extent.|[View Docs](https://docs.flutter.io/flutter/widgets/ListView.builder.html)|
28+
|`mounted`|Mounted|Whether this State object is currently in a tree.|[View Docs](https://api.flutter.dev/flutter/widgets/State/mounted.html)|
29+
|`nosm`|No Such Method|This method is invoked when a non-existent method or property is accessed.|[View Docs](https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.htmll)|
2630
|`orientationBldr`|Orientation Builder|Creates a builder which allows for the orientation of the device to be specified and referenced|[View Docs](https://api.flutter.dev/flutter/widgets/OrientationBuilder-class.html)|
31+
|`reassemble`|Reassemble|Called whenever the application is reassembled during debugging, for example during hot reload.|[View Docs](https://api.flutter.dev/flutter/widgets/State/reassemble.html)|
2732
|`row`| |Creates a Row Widget|[View Docs](https://docs.flutter.io/flutter/widgets/Row-class.html)|
2833
|`singleChildSV`|Single Child Scroll View|Creates a scroll view with a single child|[View Docs](https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html)|
34+
|`snk`|Sink|A Sink is the input of a stream.|[View Docs](https://api.dartlang.org/stable/dart-async/StreamController-class.html)|
2935
|`streamBldr`| Stream Builder |Creates a new StreamBuilder that builds itself based on the latest snapshot of interaction with the specified stream |[View Docs](https://docs.flutter.io/flutter/widgets/StreamBuilder-class.html)|
3036
|`statefulBldr`|Stateful Builder|Creates a widget that both has state and delegates its build to a callback. Useful for rebuilding specific sections of the widget tree.|[View Docs](https://api.flutter.dev/flutter/widgets/StatefulBuilder/StatefulBuilder.html)|
31-
|`subj`|Subject|A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream.|[View Docs](https://pub.dev/documentation/rxdart/latest/rx/BehaviorSubject-class.html)|
32-
|`text`| |Creates a Text Widget|[View Docs](https://docs.flutter.io/flutter/widgets/Text-class.html)|
37+
|`strm`|StreamController|A source of asynchronous data events. A stream can be of any data type.|[View Docs](https://api.dartlang.org/stable/dart-async/StreamController-class.html)|
38+
|`subj`|BehaviorSubject|A BehaviorSubject is also a broadcast StreamController which returns an Observable rather than a Stream.|[View Docs](https://pub.dev/documentation/rxdart/latest/rx/BehaviorSubject-class.html)|
39+
|`txt`| |Creates a Text Widget|[View Docs](https://docs.flutter.io/flutter/widgets/Text-class.html)|
40+
|`toStr`|To String|Returns a string representation of this object.|[View Docs](https://docs.flutter.io/flutter/widgets/Text-class.html)|
41+
|`tweenAnimationBldr`|Tween Animation Builder|Widget builder that animates a property of a Widget to a target value whenever the target value changes.|[View Docs](https://api.flutter.dev/flutter/animation/Tween-class.html)|
42+
|`valueListenableBldr`|Given a ValueListenable and a builder which builds widgets from concrete values of T, this class will automatically register itself as a listener of the ValueListenable and call the builder with updated values when the value changes.|[View Docs](https://api.flutter.dev/flutter/widgets/ValueListenableBuilder-class.html)|
3343

3444
### Cupertino Specific
35-
| Shortcut| Exapnded | Description| Flutter Docs |
45+
| Shortcut| Expanded | Description| Flutter Docs |
3646
| ---------- | ------------------------ | -------|------------- |
3747
|`cupeApp`|Cupertino App |Create a New Cupertino App| [View Docs](https://api.flutter.dev/flutter/cupertino/CupertinoApp-class.html)|
3848
|`importC`| Cupertino Package|Import Cupertino package.| [View Docs](https://api.flutter.dev/flutter/cupertino/cupertino-library.html)|

resources/META-INF/plugin.xml

Lines changed: 4 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,110 +2,12 @@
22
<idea-plugin>
33
<id>com.herbert.george.flutter-snippets</id>
44
<name>Flutter Snippets</name>
5-
<version>1.0.0-beta</version>
5+
<version>1.0.0-beta-2</version>
66
<vendor>George Herbert</vendor>
77
<description><![CDATA[
8-
<p>Provides live templates for Flutter to save time writing boilerplate.</p>
9-
The following commands are supported:
10-
<table>
11-
<tr>
12-
<th>Shortcut</th>
13-
<th>Description</th>
14-
</tr>
15-
<tr>
16-
<td>alertDialog</td>
17-
<td>Creates a showDialog that returns with AlertDialog</td>
18-
</tr>
19-
<tr>
20-
<td>animBldr</td>
21-
<td>Creates an AnimationBuilder</td>
22-
</tr>
23-
<tr>
24-
<td>aspectRatio</td>
25-
<td>Creates an AspectRatio</td>
26-
</tr>
27-
<tr>
28-
<td>column</td>
29-
<td>Creates a Column Widget</td>
30-
</tr>
31-
<tr>
32-
<td>container</td>
33-
<td>Creates a Container Widget</td>
34-
</tr>
35-
<tr>
36-
<td>customClipper</td>
37-
<td>Creates a CustomClipper</td>
38-
</tr>
39-
<tr>
40-
<td>customPainter</td>
41-
<td>Creates a CustomPainter</td>
42-
</tr>
43-
<tr>
44-
<td>customScrollV</td>
45-
<td>Creates a CustomScrollView</td>
46-
</tr>
47-
<tr>
48-
<td>futureBldr</td>
49-
<td>Creates a FutureBuilder</td>
50-
</tr>
51-
<tr>
52-
<td>layoutBldr</td>
53-
<td>Creates a LayoutBuilder</td>
54-
</tr>
55-
<tr>
56-
<td>listViewBldr</td>
57-
<td>Creates a ListView.builder()</td>
58-
</tr>
59-
<tr>
60-
<td>importMat</td>
61-
<td>Adds Material Import</td>
62-
</tr>
63-
<tr>
64-
<td>importCup</td>
65-
<td>Adds Cupertino Import</td>
66-
</tr>
67-
<tr>
68-
<td>orientatBldr</td>
69-
<td>Creates a ListView.builder()</td>
70-
</tr>
71-
<tr>
72-
<td>row</td>
73-
<td>Creates a Row Widget</td>
74-
</tr>
75-
<tr>
76-
<td>scfAll</td>
77-
<td>Creates a Scaffold containing an Appbar, BottomNavigationBar and FloatingActionButton</td>
78-
</tr>
79-
<tr>
80-
<td>scfAppBar</td>
81-
<td>Creates a Scaffold containing an Appbar</td>
82-
</tr>
83-
<tr>
84-
<td>scfAppBarFab</td>
85-
<td>Creates a Scaffold containing an Appbar and Floating Action Button</td>
86-
</tr>
87-
<tr>
88-
<td>scfAppBarBtmNav</td>
89-
<td>Creates a Scaffold containing an Appbar and Bottom Navigation Bar</td>
90-
</tr>
91-
<tr>
92-
<td>singleChildScrollV</td>
93-
<td>Creates a SingleChildScrollView</td>
94-
</tr>
95-
<tr>
96-
<td>streamBldr</td>
97-
<td>Creates a StreamBuilder</td>
98-
</tr>
99-
<tr>
100-
<td>stfulBldr</td>
101-
<td>Creates a StatefulBuilder</td>
102-
</tr>
103-
<tr>
104-
<td>text</td>
105-
<td>Creates a Text Widget</td>
106-
</tr>
107-
</table>]]></description>
108-
<change-notes>[Breaking Changes] - A overhaul to bring us in line with the VS plugin and make short cuts consistent ADD NEW WIDEGETS TO ABOVE TABLE</change-notes>
8+
For full details of the available snippet, please <a href="https://github.com/georgeherby/flutter-snippets/blob/master/README.md">visit here</a>
9+
]]></description>
10+
<change-notes>[Breaking Changes] - A overhaul to bring us in line with the VS plugin and make shortcuts consistent </change-notes>
10911
<idea-version since-build="141.0" />
11012
<depends>com.intellij.modules.java</depends>
11113
<extensions defaultExtensionNs="com.intellij">

0 commit comments

Comments
 (0)