writeImage method

  1. @override
Future<void> writeImage(
  1. String diskId, {
  2. required String imagePath,
  3. bool verify = true,
  4. bool allowElevation = true,
  5. MediaProgressCallback? onProgress,
})
override

Writes an uncompressed raw IMG or USB-compatible hybrid ISO to a whole disk. Erases the disk layout. Ordinary Windows/macOS installer ISOs need their dedicated installer methods instead. Verification reads back image bytes. macOS can request administrator authorization when allowElevation is true.

Implementation

@override
Future<void> writeImage(
  String diskId, {
  required String imagePath,
  bool verify = true,
  bool allowElevation = true,
  MediaProgressCallback? onProgress,
}) =>
    _mediaOperation(
        'writeImage',
        diskId,
        {
          'imagePath': imagePath,
          'verify': verify,
          'allowElevation': allowElevation,
        },
        onProgress);