-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippets.json
68 lines (67 loc) · 1.61 KB
/
snippets.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
{
"Part statement": {
"prefix": "pts",
"body": [
"part '${TM_FILENAME_BASE}.g.dart';"
],
"description": "Creates a filled-in part statement"
},
"Part 'Freezed' statement": {
"prefix": "ptf",
"body": [
"part '${TM_FILENAME_BASE}.freezed.dart';"
],
"description": "Creates a filled-in freezed part statement"
},
"Freezed Data Class": {
"prefix": "fdataclass",
"body": [
"@immutable",
"abstract class ${1:DataClass} with _$${1:DataClass}{",
" const factory ${1:DataClass}(${2}) = _${1:DataClass};",
"}"
],
"description": "Freezed Data Class"
},
"Freezed Union": {
"prefix": "funion",
"body": [
"@immutable",
"abstract class ${1:Union} with _$${1:Union}{",
" const factory ${1:Union}.${2}(${4}) = ${3};",
"}"
],
"description": "Freezed Union"
},
"Freezed Union Case": {
"prefix": "funioncase",
"body": [
"const factory ${1:Union}.${2}(${4}) = ${3};"
],
"description": "Freezed Union Case"
},
"Import Flutter Material": {
"prefix": "ifm",
"body": [
"import 'package:flutter/material.dart';"
],
"description": "imports flutters material library"
},
"Create Value Object Extention":{
"prefix": "vobj",
"body": [
"class ${1:DataClass} extends ValueObject<${2:DataType}> {",
" @override",
" final Either<ValueFailure<${2:DataType}>, ${2:DataType}> value;",
" ",
" factory ${1:DataClass}(${2:DataType} input){",
" return ${1:DataClass}._(",
" //insert validation",
" );",
" }",
" ",
" const ${1:DataClass}._(this.value);",
"}"
]
}
}