Created
April 14, 2021 19:01
-
-
Save TheAnimatrix/4c710dae606a42a11b07566ad0d42f1b to your computer and use it in GitHub Desktop.
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
Show hidden characters
{ | |
// Place your coingecko_dart workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "scope": "javascript,typescript", | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", | |
// "$2" | |
// ], | |
// "description": "Log output to console" | |
// } | |
"Print-Dart": { | |
"scope": "dart", | |
"prefix": "pdart", | |
"body": "print(\"$1\");", | |
"description": "Simplified print in dart" | |
} | |
, | |
"from-json-dart": { | |
"scope": "dart", | |
"prefix": "obfj", | |
"body": [ | |
"$1.fromJson(Map<String, dynamic> json) {", | |
"\t$0", | |
"}" | |
], | |
"description": "dart class template for, from json function" | |
} | |
, | |
"to-json-dart": { | |
"scope": "dart", | |
"prefix": "obtj", | |
"body": [ | |
"Map<String, dynamic> toJson() {", | |
"\tfinal Map<String, dynamic> data = new Map<String, dynamic>();", | |
"\t$0", | |
"\treturn data;", | |
"}" | |
], | |
"description": "dart class template for, to json function" | |
}, | |
"fj-map": { | |
"scope": "dart", | |
"prefix": "obfm", | |
"body": ["$1 = json['$1'];","obfm$0"] | |
}, | |
"tj-map": { | |
"scope": "dart", | |
"prefix": "obtm", | |
"body": ["data['$1'] = this.$1;","obtm$0"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment