Last active
February 27, 2023 11:08
-
-
Save lesnitsky/215feba168a607146fdc8e1ed0db1c78 to your computer and use it in GitHub Desktop.
Flutter snippets
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
{ | |
"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