vscodeLaunchJson static method

String vscodeLaunchJson(
  1. ProjectConfig c
)

VS Code launch configurations — one per flavor.

Implementation

static String vscodeLaunchJson(ProjectConfig c) {
  final configs = c.flavors.map((f) => '''
  {
    "name": "$f",
    "request": "launch",
    "type": "dart",
    "program": "lib/main_$f.dart",
    "args": ["--flavor", "$f"]
  }''').join(',\n');
  return '''
{
"version": "0.2.0",
"configurations": [
$configs
]
}
''';
}