Currently the extension generates dart files and fills in the boilerplate code via the variables found in the extension.js file. I believe a better approach will be to segregate/sort these boilerplate codes into separate files within the source code folder and then reference somehow during runtime.
I tried taking this approach but it seems it doesn't work well after bundling the extension into a .vsix.
Perhaps, Github variables can come to the rescue and help a bit here.
Please note that this is only the approach I think is optimal. Better approaches/suggestions are always appreciated.