parseDownloadStatus function

DownloadStatus? parseDownloadStatus(
  1. String? value
)

Parses the normalized download-status wire values.

Implementation

DownloadStatus? parseDownloadStatus(String? value) => switch (value) {
      null => null,
      'notDownloaded' => DownloadStatus.notDownloaded,
      'downloaded' => DownloadStatus.downloaded,
      'current' => DownloadStatus.current,
      _ => throw FormatException('Unsupported downloadStatus: $value'),
    };