Last active
March 22, 2023 09:54
-
-
Save arifikhsan/e221a8578f9b8adc03a568aec34d0893 to your computer and use it in GitHub Desktop.
snippet from resocoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": [ | |
"@freezed", | |
"abstract class ${1:DataClass} with _$${1:DataClass}{", | |
" const factory ${1:DataClass}(${2}) = _${1:DataClass};", | |
"}" | |
], | |
"description": "Freezed Data Class" | |
}, | |
"Freezed Union": { | |
"prefix": "funion", | |
"body": [ | |
"@freezed", | |
"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" | |
}, | |
"triple_a_test": { | |
"prefix": "aaa", | |
"body": [ | |
"test(", | |
"\t'should $1',", | |
"\t() async {", | |
"\t\t// arrange", | |
"\t\t$2", | |
"\t\t// act", | |
"\t\t$3", | |
"\t\t// assert", | |
"\t\t$4", | |
"\t},", | |
");" | |
], | |
"description": "Flutter test arrange act assert" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ctrl shift p | |
configure user snippet | |
select dart | |
paste the code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the collection of these snippets!