You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`layoutBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/LayoutBuilder-class.html)|Creates a LayoutBuilder|
13
15
|`listViewBldr`|[View Docs](https://docs.flutter.io/flutter/widgets/ListView.builder.html)|Creates a ListView.builder()|
16
+
|`orienatatBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/OrientationBuilder-class.html)|Creates a OrientationBuilder|
14
17
|`scfAll`|[View Docs](https://docs.flutter.io/flutter/material/Scaffold-class.html)|Creates a Scaffold containing an Appbar, BottomNavigationBar and FloatingActionButton|
15
18
|`scfAppBar`||Creates a Scaffold containing an Appbar|
16
19
|`scfAppBarFab`||Creates a Scaffold containing an Appbar and Floating Action Button|
17
20
|`scfAppBarBtmNav`||Creates a Scaffold containing an Appbar and Bottom Navigation Bar|
18
21
|`singleChildScrollV`|[View Docs](https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html)|Creates a SingleChildScrollView|
19
22
|`streamBldr`|[View Docs](https://docs.flutter.io/flutter/widgets/StreamBuilder-class.html)|Creates a StreamBuilder|
23
+
|`stfulBldr`|[View Docs](https://api.flutter.dev/flutter/widgets/StatefulBuilder/StatefulBuilder.html)|Creates a StatefulBuilder|
Copy file name to clipboardExpand all lines: resources/META-INF/plugin.xml
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<idea-plugin>
3
3
<id>com.herbert.george.flutter-snippets</id>
4
4
<name>Flutter Snippets</name>
5
-
<version>0.1.3</version>
5
+
<version>0.1.4</version>
6
6
<vendor>George Herbert</vendor>
7
7
<description><![CDATA[
8
8
<p>Provides live templates for Flutter to save time writing boilerplate.</p>
@@ -35,6 +35,18 @@ The following commands are supported:
35
35
<tr>
36
36
<td>listViewBldr</td>
37
37
<td>Creates a ListView.builder()</td>
38
+
</tr>
39
+
<tr>
40
+
<td>importMat</td>
41
+
<td>Adds Material Import</td>
42
+
</tr>
43
+
<tr>
44
+
<td>importCup</td>
45
+
<td>Adds Cupertino Import</td>
46
+
</tr>
47
+
<tr>
48
+
<td>orientatBldr</td>
49
+
<td>Creates a ListView.builder()</td>
38
50
</tr>
39
51
<tr>
40
52
<td>scfAll</td>
@@ -60,8 +72,12 @@ The following commands are supported:
60
72
<td>streamBldr</td>
61
73
<td>Creates a StreamBuilder</td>
62
74
</tr>
75
+
<tr>
76
+
<td>stfulBldr</td>
77
+
<td>Creates a StatefulBuilder</td>
78
+
</tr>
63
79
</table>]]></description>
64
-
<change-notes>Add support for customScrollV (CustomScrollView), layoutBldr (LayoutBuilder) and singleChildScrollV (SingleChildScrollView)</change-notes>
80
+
<change-notes>Add support for stfulBldr (StatefulBuilder), orienatatBldr (OrientationBuilder) and import shortcuts for Material (importMat) and Cupertino (importCup)</change-notes>
Copy file name to clipboardExpand all lines: resources/liveTemplates/Flutter.xml
+26-1Lines changed: 26 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,12 +104,37 @@
104
104
</context>
105
105
</template>
106
106
<!-- New Scaffold with AppBar and Bottom Nav Bar-->
107
-
<templatename="scfAppBarBtmNav"value="int _index = 0; // Make sure this is outside build(), otherwise every setState will chage the value back to 0 return Scaffold( appBar: AppBar( title: Text('$appbarTitle$'), ), body: Center( child: Container(child: Text('You are looking at the message for bottom navigation item $_index')), ), bottomNavigationBar: BottomNavigationBar( onTap: (tappedItemIndex) => setState(() { _index = tappedItemIndex; }), currentIndex: _index, items: [ BottomNavigationBarItem(icon: Icon(Icons.av_timer), title: Text('$navBarItem1Text$')), BottomNavigationBarItem(icon: Icon(Icons.add), title: Text('$navBarItem2Text$')) ]) );"description="New Scaffold with AppBar & Bottom Nav Bar"toReformat="false"toShortenFQNames="true">
107
+
<templatename="scfAppBarBtmNav"value="int _index = 0; // Make sure this is outside build(), otherwise every setState will change the value back to 0 return Scaffold( appBar: AppBar( title: Text('$appbarTitle$'), ), body: Center( child: Container(child: Text('You are looking at the message for bottom navigation item $_index')), ), bottomNavigationBar: BottomNavigationBar( onTap: (tappedItemIndex) => setState(() { _index = tappedItemIndex; }), currentIndex: _index, items: [ BottomNavigationBarItem(icon: Icon(Icons.av_timer), title: Text('$navBarItem1Text$')), BottomNavigationBarItem(icon: Icon(Icons.add), title: Text('$navBarItem2Text$')) ]) );"description="New Scaffold with AppBar & Bottom Nav Bar"toReformat="false"toShortenFQNames="true">
<templatename="orientatBldr"value="OrientationBuilder( builder: (BuildContext context, Orientation orientation) { return GridView.count( // Create a grid with 2 columns in portrait mode, or 3 columns in // landscape mode. crossAxisCount: orientation == Orientation.portrait ? 2 : 3, ); }, );"description="New OrientationBuilder"toReformat="false"toShortenFQNames="true">
124
+
<context>
125
+
<optionname="DART_STATEMENT"value="true" />
126
+
</context>
127
+
</template>
128
+
<!-- Add Material Package Import-->
129
+
<templatename="importMat"value="import 'package:flutter/material.dart';"description="Import Material Package"toReformat="false"toShortenFQNames="true">
0 commit comments