carve function

void carve({
  1. required String name,
  2. required ArgResults argResults,
})

Interface between bin and lib

name specifies the current used command argResults are the results of the parsing

Implementation

void carve({required String name, required ArgResults argResults}) {
  final CommandType type = from(name);
  final Carver carver = Carver();
  switch (type) {
    case CommandType.model:
      return carver.carveModel(argResults);
    default:
      throw UnsupportedError('Unsupported CommandType: ' + type.toString());
  }
}