|
1 | 1 | <templateSet group="Flutter">
|
2 |
| - <template name="stless" value="class $NAME$ extends StatelessWidget { const $NAME$({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateless widget" toReformat="false" toShortenFQNames="true"> |
| 2 | + <template name="stless" value="class $NAME$ extends StatelessWidget { const $NAME$({super.key}); @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateless widget" toReformat="false" toShortenFQNames="true"> |
3 | 3 | <variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
4 | 4 | <context>
|
5 | 5 | <option name="DART_TOPLEVEL" value="true" />
|
6 | 6 | </context>
|
7 | 7 | </template>
|
8 |
| - <template name="stful" value="class $NAME$ extends StatefulWidget { const $NAME$({Key? key}) : super(key: key); @override State<$NAME$> createState() => $SNAME$(); } class $SNAME$ extends State<$NAME$> { @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateful widget" toReformat="false" toShortenFQNames="true"> |
| 8 | + <template name="stful" value="class $NAME$ extends StatefulWidget { const $NAME$({super.key}); @override State<$NAME$> createState() => $SNAME$(); } class $SNAME$ extends State<$NAME$> { @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateful widget" toReformat="false" toShortenFQNames="true"> |
9 | 9 | <variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
10 | 10 | <variable name="SNAME" expression="regularExpression(concat("_", NAME, "State"), "^__", "_")" defaultValue="" alwaysStopAt="false" />
|
11 | 11 | <context>
|
12 | 12 | <option name="DART_TOPLEVEL" value="true" />
|
13 | 13 | </context>
|
14 | 14 | </template>
|
15 |
| - <template name="inh" value="class $NAME$ extends InheritedWidget { const $NAME$({ Key? key, required Widget child, }) : super(key: key, child: child); static $NAME$ of(BuildContext context) { final $NAME$? result = context.dependOnInheritedWidgetOfExactType<$NAME$>(); assert(result != null, 'No $NAME$ found in context'); return result!; } @override bool updateShouldNotify($NAME$ old) { return $SHOULD_NOTIFY$; } } " description="New Inherited widget" toReformat="true" toShortenFQNames="true"> |
| 15 | + <template name="inh" value="class $NAME$ extends InheritedWidget { const $NAME$({ super.key, required Widget child, }) : super(child: child); static $NAME$ of(BuildContext context) { final $NAME$? result = context.dependOnInheritedWidgetOfExactType<$NAME$>(); assert(result != null, 'No $NAME$ found in context'); return result!; } @override bool updateShouldNotify($NAME$ old) { return $SHOULD_NOTIFY$; } } " description="New Inherited widget" toReformat="true" toShortenFQNames="true"> |
16 | 16 | <variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
17 | 17 | <variable name="SHOULD_NOTIFY" expression="" defaultValue="" alwaysStopAt="true" />
|
18 | 18 | <context>
|
19 | 19 | <option name="DART_TOPLEVEL" value="true" />
|
20 | 20 | </context>
|
21 | 21 | </template>
|
22 |
| - <template name="stanim" value="class $NAME$ extends StatefulWidget { const $NAME$({Key? key}) : super(key: key); @override State<$NAME$> createState() => _$NAME$State(); } class _$NAME$State extends State<$NAME$> with SingleTickerProviderStateMixin { late AnimationController _controller; @override void initState() { super.initState(); _controller = AnimationController(vsync: this); } @override void dispose() { _controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateful widget with AnimationController" toReformat="false" toShortenFQNames="true"> |
| 22 | + <template name="stanim" value="class $NAME$ extends StatefulWidget { const $NAME$({super.key}); @override State<$NAME$> createState() => _$NAME$State(); } class _$NAME$State extends State<$NAME$> with SingleTickerProviderStateMixin { late AnimationController _controller; @override void initState() { super.initState(); _controller = AnimationController(vsync: this); } @override void dispose() { _controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return const Placeholder($END$); } } " description="New Stateful widget with AnimationController" toReformat="false" toShortenFQNames="true"> |
23 | 23 | <variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
|
24 | 24 | <context>
|
25 | 25 | <option name="DART_TOPLEVEL" value="true" />
|
|
0 commit comments