Device.fromJson constructor

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

Implementation

factory Device.fromJson(Map<String, dynamic> json) {
  return Device(
    hostPath: json['hostPath'] as String,
    containerPath: json['containerPath'] as String?,
    permissions: (json['permissions'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toDeviceCgroupPermission())
        .toList(),
  );
}