Skip to content

Instantly share code, notes, and snippets.

@debkanchan
Created February 12, 2021 16:52
Show Gist options
  • Save debkanchan/a519e36f7a2ce62212dd20de9515e67d to your computer and use it in GitHub Desktop.
Save debkanchan/a519e36f7a2ce62212dd20de9515e67d to your computer and use it in GitHub Desktop.
Flutter Riverpod Snippets
{
"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