ProjectedVolumeSource.fromJson constructor
Creates a ProjectedVolumeSource from JSON data.
Implementation
factory ProjectedVolumeSource.fromJson(Map<String, dynamic> json) {
final tempDefaultModeJson = json['defaultMode'];
final tempSourcesJson = json['sources'];
final int? tempDefaultMode = tempDefaultModeJson;
final List<VolumeProjection>? tempSources = tempSourcesJson != null
? List<dynamic>.from(tempSourcesJson)
.map(
(e) => VolumeProjection.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return ProjectedVolumeSource(
defaultMode: tempDefaultMode,
sources: tempSources,
);
}