Skip to content

Instantly share code, notes, and snippets.

@sgr-ksmt
Created Nov 6, 2020
Embed
What would you like to do?
VSCode Snippet: river_pod provider template
{
"prvdr": {
"prefix": "prvdr",
"body": [
"import 'package:hooks_riverpod/hooks_riverpod.dart';",
"final ${1:${TM_FILENAME_BASE/((^[a-z])|_([a-z]))/${2:/downcase}${3:/upcase}/g}} = Provider$2((ref) => ${TM_FILENAME_BASE/((^[a-z])|_([a-z]))/${2:/upcase}${3:/upcase}/g}(ref.read));",
"",
"class ${TM_FILENAME_BASE/((^[a-z])|_([a-z]))/${2:/upcase}${3:/upcase}/g} {",
" const ${TM_FILENAME_BASE/((^[a-z])|_([a-z]))/${2:/upcase}${3:/upcase}/g}(this._read);",
" final Reader _read;",
"}",
]
}
}
@sgr-ksmt
Copy link
Author

sgr-ksmt commented Nov 6, 2020

Example

Nov-06-2020 22-13-56

Special Thanks

Original: mono0926/live_templates@0024f05

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment