map method
Maps a single JSON object into an EagleEyeConfigItem.
The ConfigKeys.nameEagleItemKey field is optional and maps to null
when absent. Throws an InvalidConfigException when a required field is
missing or when a field has an unexpected type.
Implementation
EagleEyeConfigItem map(Map<String, dynamic> json) {
final dependenciesAllowed = _readDependenciesAllowed(json);
final forbiddenDependencies = _readStringList(
json,
ConfigKeys.forbiddenDependenciesEagleItemKey,
);
final exclusiveDependencies = _readStringList(
json,
ConfigKeys.exclusiveDependenciesEagleItemKey,
);
final filePattern = _readFilePattern(json);
final name = _readName(json);
return EagleEyeConfigItem(
dependenciesAllowed: dependenciesAllowed,
forbiddenDependencies: forbiddenDependencies,
exclusiveDependencies: exclusiveDependencies,
filePattern: filePattern,
name: name,
);
}