DVDevClientManifest.fromJson constructor
Implementation
factory DVDevClientManifest.fromJson(Map<String, Object?> json) {
final Object? target = json['target'];
if (target is! String || target.trim().isEmpty) {
throw const FormatException(
'A dev-client manifest names the target it was resolved for.',
);
}
final Object? bindings = json['bindings'];
if (bindings is! List || bindings.any((Object? b) => b is! String)) {
throw const FormatException(
'A dev-client manifest lists its bindings as strings.',
);
}
return DVDevClientManifest(
target: target,
bindings: (bindings.cast<String>().toSet().toList()..sort()),
);
}