forked from Dart-Code/Dart-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flutter.json
71 lines (71 loc) · 1.58 KB
/
flutter.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
".source.dart": {
"Flutter stateless widget": {
"prefix": "stless",
"description": "Insert a StatelessWidget",
"body": [
"class $1 extends StatelessWidget {",
" @override",
" Widget build(BuildContext context) {",
" return Container(",
" $2",
" );",
" }",
"}"
]
},
"Flutter stateful widget": {
"prefix": "stful",
"description": "Insert a StatefulWidget",
"body": [
"class $1 extends StatefulWidget {",
" @override",
" _$1State createState() => _$1State();",
"}",
"",
"class _$1State extends State<$1> {",
" @override",
" Widget build(BuildContext context) {",
" return Container(",
" $2",
" );",
" }",
"}"
]
},
"Flutter widget with AnimationController": {
"prefix": "stanim",
"description": "Insert a StatefulWidget with an AnimationController",
"body": [
"class $1 extends StatefulWidget {",
" @override",
" _$1State createState() => _$1State();",
"}",
"",
"class _$1State extends State<$1>",
" with SingleTickerProviderStateMixin {",
" AnimationController _controller;",
"",
" @override",
" void initState() {",
" super.initState();",
" _controller = AnimationController(vsync: this);",
" }",
"",
" @override",
" void dispose() {",
" super.dispose();",
" _controller.dispose();",
" }",
"",
" @override",
" Widget build(BuildContext context) {",
" return Container(",
" $2",
" );",
" }",
"}"
]
}
}
}