Skip to content

Commit d71b8b3

Browse files
authored
Change Container to Placeholder in live templates (flutter#6390)
1 parent ba03308 commit d71b8b3

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/liveTemplates/flutter_miscellaneous.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<templateSet group="Flutter">
2-
<template name="stless" value="class $NAME$ extends StatelessWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; Widget build(BuildContext context) {&#10; return Container($END$);&#10; }&#10;}&#10;" description="New Stateless widget" toReformat="false" toShortenFQNames="true">
2+
<template name="stless" value="class $NAME$ extends StatelessWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; Widget build(BuildContext context) {&#10; return Placeholder($END$);&#10; }&#10;}&#10;" description="New Stateless widget" toReformat="false" toShortenFQNames="true">
33
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
44
<context>
55
<option name="DART_TOPLEVEL" value="true" />
66
</context>
77
</template>
8-
<template name="stful" value="class $NAME$ extends StatefulWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; State&lt;$NAME$&gt; createState() =&gt; $SNAME$();&#10;}&#10;&#10;class $SNAME$ extends State&lt;$NAME$&gt; {&#10; @override&#10; Widget build(BuildContext context) {&#10; return Container($END$);&#10; }&#10;}&#10;" description="New Stateful widget" toReformat="false" toShortenFQNames="true">
8+
<template name="stful" value="class $NAME$ extends StatefulWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; State&lt;$NAME$&gt; createState() =&gt; $SNAME$();&#10;}&#10;&#10;class $SNAME$ extends State&lt;$NAME$&gt; {&#10; @override&#10; Widget build(BuildContext context) {&#10; return Placeholder($END$);&#10; }&#10;}&#10;" description="New Stateful widget" toReformat="false" toShortenFQNames="true">
99
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
1010
<variable name="SNAME" expression="regularExpression(concat(&quot;_&quot;, NAME, &quot;State&quot;), &quot;^__&quot;, &quot;_&quot;)" defaultValue="" alwaysStopAt="false" />
1111
<context>
@@ -19,7 +19,7 @@
1919
<option name="DART_TOPLEVEL" value="true" />
2020
</context>
2121
</template>
22-
<template name="stanim" value="class $NAME$ extends StatefulWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; State&lt;$NAME$&gt; createState() =&gt; _$NAME$State();&#10;}&#10;&#10;class _$NAME$State extends State&lt;$NAME$&gt; with SingleTickerProviderStateMixin {&#10; late AnimationController _controller;&#10;&#10; @override&#10; void initState() {&#10; super.initState();&#10; _controller = AnimationController(vsync: this);&#10; }&#10;&#10; @override&#10; void dispose() {&#10; _controller.dispose();&#10; super.dispose();&#10; }&#10;&#10; @override&#10; Widget build(BuildContext context) {&#10; return Container($END$);&#10; }&#10;}&#10;" description="New Stateful widget with AnimationController" toReformat="false" toShortenFQNames="true">
22+
<template name="stanim" value="class $NAME$ extends StatefulWidget {&#10; const $NAME$({Key? key}) : super(key: key);&#10;&#10; @override&#10; State&lt;$NAME$&gt; createState() =&gt; _$NAME$State();&#10;}&#10;&#10;class _$NAME$State extends State&lt;$NAME$&gt; with SingleTickerProviderStateMixin {&#10; late AnimationController _controller;&#10;&#10; @override&#10; void initState() {&#10; super.initState();&#10; _controller = AnimationController(vsync: this);&#10; }&#10;&#10; @override&#10; void dispose() {&#10; _controller.dispose();&#10; super.dispose();&#10; }&#10;&#10; @override&#10; Widget build(BuildContext context) {&#10; return Placeholder($END$);&#10; }&#10;}&#10;" description="New Stateful widget with AnimationController" toReformat="false" toShortenFQNames="true">
2323
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
2424
<context>
2525
<option name="DART_TOPLEVEL" value="true" />

resources/liveTemplates/stanim.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ class _$NAME$State extends State<$NAME$> with SingleTickerProviderStateMixin {
2222

2323
@override
2424
Widget build(BuildContext context) {
25-
return Container($END$);
25+
return Placeholder($END$);
2626
}
2727
}

resources/liveTemplates/stful.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class $NAME$ extends StatefulWidget {
88
class $SNAME$ extends State<$NAME$> {
99
@override
1010
Widget build(BuildContext context) {
11-
return Container($END$);
11+
return Placeholder($END$);
1212
}
1313
}

resources/liveTemplates/stless.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ class $NAME$ extends StatelessWidget {
33

44
@override
55
Widget build(BuildContext context) {
6-
return Container($END$);
6+
return Placeholder($END$);
77
}
88
}

0 commit comments

Comments
 (0)