BootstrapCommandConfigs.fromYaml constructor

BootstrapCommandConfigs.fromYaml(
  1. Map<Object?, Object?> yaml
)

Implementation

factory BootstrapCommandConfigs.fromYaml(Map<Object?, Object?> yaml) {
  final usePubspecOverrides = assertKeyIsA<bool?>(
        key: 'usePubspecOverrides',
        map: yaml,
        path: 'command/bootstrap',
      ) ??
      false;

  final runPubGetInParallel = assertKeyIsA<bool?>(
        key: 'runPubGetInParallel',
        map: yaml,
        path: 'command/bootstrap',
      ) ??
      true;

  final runPubGetOffline = assertKeyIsA<bool?>(
        key: 'runPubGetOffline',
        map: yaml,
        path: 'command/bootstrap',
      ) ??
      false;

  return BootstrapCommandConfigs(
    usePubspecOverrides: usePubspecOverrides,
    runPubGetInParallel: runPubGetInParallel,
    runPubGetOffline: runPubGetOffline,
  );
}