ContainerVolumeOptions.fromJson constructor

ContainerVolumeOptions.fromJson(
  1. Map<String, dynamic> json
)

Deserialises from Docker's JSON representation.

Implementation

factory ContainerVolumeOptions.fromJson(Map<String, dynamic> json) {
  final dc = json['DriverConfig'] as Map<String, dynamic>?;
  return ContainerVolumeOptions(
    noCopy: json['NoCopy'] as bool?,
    labels: (json['Labels'] as Map<String, dynamic>?)?.cast<String, String>(),
    driverConfig:
        dc != null ? ContainerVolumeDriverConfig.fromJson(dc) : null,
    subpath: json['Subpath'] as String?,
  );
}