Created
February 12, 2021 16:52
-
-
Save debkanchan/a519e36f7a2ce62212dd20de9515e67d to your computer and use it in GitHub Desktop.
Flutter Riverpod 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
{ | |
"Hook Widget": { | |
"prefix": "hookw", | |
"body": [ | |
"class ${1:WidgetName} extends HookWidget {", | |
"\t@override", | |
"\tWidget build(BuildContext context) {", | |
"\t\treturn ${2};", | |
"\t}", | |
"}", | |
], | |
"description": "Create HookWidget" | |
}, | |
"Stateful Hook Widget": { | |
"prefix": "stfulhookw", | |
"body": [ | |
"class ${1:WidgetName} extends StatefulHookWidget {", | |
"\t@override", | |
"\t_${1:WidgetName}State createState() => _${1:WidgetName}State();", | |
"}", | |
"", | |
"class _${1:WidgetName}State extends State<${1:WidgetName}> {", | |
"\t@override", | |
"\tWidget build(BuildContext context) {", | |
"\t\treturn ;", | |
"\t}", | |
"}", | |
], | |
"description": "Create SatefulWidget with Hooks" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment