Skip to content

Instantly share code, notes, and snippets.

@mkieres
Last active June 15, 2023 01:30
Show Gist options
  • Save mkieres/5c7a509e7081e6dd4633223460d7a75b to your computer and use it in GitHub Desktop.
Save mkieres/5c7a509e7081e6dd4633223460d7a75b to your computer and use it in GitHub Desktop.
VS Code Flutter Code Generator Task
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
// See blog post https://nivisi.medium.com/tired-of-re-running-flutter-code-generation-heres-how-to-do-it-with-a-shortcut-in-vs-code-8f3fae216058
// for details on integrating
"version": "2.0.0",
"tasks": [
{
"label": "Flutter: Generate Code",
"type": "shell",
"command": "flutter packages pub run build_runner build -v --delete-conflicting-outputs",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment