Skip to content

Commit

Permalink
Merge pull request #1691 from navaronbracke-endare/fix_unreachble_swi…
Browse files Browse the repository at this point in the history
…tch_default

chore: fix unreachable switch default
  • Loading branch information
navaronbracke authored Jan 29, 2025
2 parents 36425c7 + 64abf81 commit 1811326
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions lib/src/file_picker_macos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ class FilePickerMacOS extends FilePicker {
return '"avi", "flv", "m4v", "mkv", "mov", "mp4", "mpeg", "webm", "wmv", "bmp", "gif", "jpeg", "jpg", "png"';
case FileType.video:
return '"avi", "flv", "mkv", "mov", "mp4", "m4v", "mpeg", "webm", "wmv"';
default:
throw Exception('unknown file type');
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/src/linux/kdialog_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ class KDialogHandler implements DialogHandler {
return 'Media File (${DialogHandler.toCaseInsensitive("*.avi *.flv *.mkv *.mov *.mp4 *.mpeg *.webm *.wmv *.bmp *.gif *.jpeg *.jpg *.png")})';
case FileType.video:
return 'Video File (${DialogHandler.toCaseInsensitive("*.avi *.flv *.mkv *.mov *.mp4 *.mpeg *.webm *.wmv")})';
default:
throw Exception('unknown file type');
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/src/linux/qarma_and_zenity_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ class QarmaAndZenityHandler implements DialogHandler {
return "Media Files | ${DialogHandler.toCaseInsensitive('*.avi *.flv *.mkv *.mov *.mp4 *.mpeg *.webm *.wmv *.bmp *.gif *.jpeg *.jpg *.png')}";
case FileType.video:
return "Video Files | ${DialogHandler.toCaseInsensitive('*.avi *.flv *.mkv *.mov *.mp4 *.mpeg *.webm *.wmv')}";
default:
throw Exception('unknown file type');
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ class FilePickerWindows extends FilePicker {
return 'Videos (*.avi,*.flv,*.mkv,*.mov,*.mp4,*.mpeg,*.webm,*.wmv)\x00*.avi;*.flv;*.mkv;*.mov;*.mp4;*.mpeg;*.webm;*.wmv\x00Images (*.bmp,*.gif,*.jpeg,*.jpg,*.png)\x00*.bmp;*.gif;*.jpeg;*.jpg;*.png\x00\x00';
case FileType.video:
return 'Videos (*.avi,*.flv,*.mkv,*.mov,*.mp4,*.mpeg,*.webm,*.wmv)\x00*.avi;*.flv;*.mkv;*.mov;*.mp4;*.mpeg;*.webm;*.wmv\x00\x00';
default:
throw Exception('unknown file type');
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/linux/kdialog_handler_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void main() {
expect(
dialogHandler.fileTypeToFileFilter(FileType.audio, null),
equals(
'Audio File (*.[aA][aA][cC] *.[mM][iI][dD][iI] *.[mM][pP]3 *.[oO][gG][gG] *.[wW][aA][vV])'),
'Audio File (*.[aA][aA][cC] *.[mM][iI][dD][iI] *.[mM][pP]3 *.[oO][gG][gG] *.[wW][aA][vV] *.[mM]4[aA])'),
);

expect(
Expand Down
2 changes: 1 addition & 1 deletion test/linux/qarma_and_zenity_handler_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void main() {
expect(
dialogHandler.fileTypeToFileFilter(FileType.audio, null),
equals(
'Audio Files | *.[aA][aA][cC] *.[mM][iI][dD][iI] *.[mM][pP]3 *.[oO][gG][gG] *.[wW][aA][vV]'),
'Audio Files | *.[aA][aA][cC] *.[mM][iI][dD][iI] *.[mM][pP]3 *.[oO][gG][gG] *.[wW][aA][vV] *.[mM]4[aA]'),
);

expect(
Expand Down

0 comments on commit 1811326

Please sign in to comment.