Skip to content

Instantly share code, notes, and snippets.

@lesnitsky
Last active February 27, 2023 11:08
Show Gist options
  • Save lesnitsky/215feba168a607146fdc8e1ed0db1c78 to your computer and use it in GitHub Desktop.
Save lesnitsky/215feba168a607146fdc8e1ed0db1c78 to your computer and use it in GitHub Desktop.
Flutter snippets
{
"JSON Serializable": {
"prefix": "jsons",
"body": [
"factory $1.fromJson(Map<String, dynamic> data) => _$$1FromJson(data);",
"Map<String, dynamic> toJson() => _$$1ToJson(this);"
]
},
"JSON Annotation": {
"prefix": "jsona",
"body": [
"part '$1.g.dart';\n",
"@JsonSerializable()"
]
},
"Flutter hello": {
"prefix": "fl",
"body": [
"import 'package:flutter/material.dart';",
"",
"void main() {",
" runApp(App());",
"}",
"",
"class App extends StatelessWidget {",
" @override",
" Widget build(BuildContext context) {",
" return MaterialApp(",
" home: ${1:Container()},",
" );",
" }",
"}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment