cliJson function

Map<String, Object?> cliJson(
  1. String command,
  2. Map<String, Object?> body
)

body as a subcommand's --json document: the format envelope every flutter3d JSON document starts with (format f3d.cli, version cliJsonVersion, requires, generator), then command, then the subcommand's own keys, whose shapes cliJsonBodies lists.

Implementation

Map<String, Object?> cliJson(String command, Map<String, Object?> body) =>
    <String, Object?>{
      'format': 'f3d.cli',
      'version': cliJsonVersion,
      'requires': const <String>[],
      'generator': 'flutter3d',
      'command': command,
      ...body,
    };