Disk.fromMap constructor

Disk.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Disk.fromMap(Map<String, dynamic> map) => Disk(
      blockSize: map['blockSize'],
      busType: map['busType'],
      busVersion: map['busVersion'],
      description: map['description'],
      device: map['device'],
      devicePath: map['devicePath'],
      error: map['error'],
      card: map['card'],
      readOnly: map['readOnly'],
      removable: map['removable'],
      scsi: map['scsi'],
      system: map['system'],
      uas: map['uas'],
      usb: map['usb'],
      virtual: map['virtual'],
      logicalBlockSize: map['logicalBlockSize'],
      mountpoints: ((map['mountpoints'] ?? []) as List)
          .map((e) => Mountpoint.fromMap(Map.from(e)))
          .toList(growable: false),
      raw: map['raw'],
      size: map['size'],
      partitionTableType: map['partitionTableType'] == 'gpt' ? PartitionTableType.gpt : PartitionTableType.mbr,
    );