initSpecVersionFromFile method

Future<void> initSpecVersionFromFile(
  1. String filePath
)

Initialize the SpecVersions from a Json file path containing spec-versions

After reading Spec Versions then it calls addSpecVersion(spec) with spec being the parsed Spec from file.

Implementation

Future<void> initSpecVersionFromFile(String filePath) async {
  final list = await readSpecVersionsFromFilePath(filePath);
  for (var spec in list) {
    addSpecVersion(spec);
  }
}