Skip to content

Commit

Permalink
adding support for the “m4a” format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaosiyang committed Aug 27, 2024
1 parent 8bbe066 commit fb05b9e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/linux/kdialog_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class KDialogHandler implements DialogHandler {
case FileType.any:
return '';
case FileType.audio:
return 'Audio File (${DialogHandler.toCaseInsensitive("*.aac *.midi *.mp3 *.ogg *.wav")})';
return 'Audio File (${DialogHandler.toCaseInsensitive("*.aac *.midi *.mp3 *.ogg *.wav *.m4a")})';
case FileType.custom:
return '${allowedExtensions!.map((ext) => ext.toUpperCase()).join(' File, ')} File (${DialogHandler.toCaseInsensitive("*.${allowedExtensions.join(' *.')}")})';
case FileType.image:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/linux/qarma_and_zenity_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class QarmaAndZenityHandler implements DialogHandler {
case FileType.any:
return '';
case FileType.audio:
return "Audio Files | ${DialogHandler.toCaseInsensitive('*.aac *.midi *.mp3 *.ogg *.wav')}";
return "Audio Files | ${DialogHandler.toCaseInsensitive('*.aac *.midi *.mp3 *.ogg *.wav *.m4a')}";
case FileType.custom:
return "Custom Files | ${DialogHandler.toCaseInsensitive('*.${allowedExtensions!.join(' *.')}')}";
case FileType.image:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class FilePickerWindows extends FilePicker {
case FileType.any:
return 'All Files (*.*)\x00*.*\x00\x00';
case FileType.audio:
return 'Audios (*.aac,*.midi,*.mp3,*.ogg,*.wav)\x00*.aac;*.midi;*.mp3;*.ogg;*.wav\x00\x00';
return 'Audios (*.aac,*.midi,*.mp3,*.ogg,*.wav,*.m4a)\x00*.aac;*.midi;*.mp3;*.ogg;*.wav;*.m4a\x00\x00';
case FileType.custom:
return 'Files (*.${allowedExtensions!.join(',*.')})\x00*.${allowedExtensions.join(';*.')}\x00\x00';
case FileType.image:
Expand Down
2 changes: 1 addition & 1 deletion test/file_picker_windows_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void main() {
expect(
picker.fileTypeToFileFilter(FileType.audio, null),
equals(
'Audios (*.aac,*.midi,*.mp3,*.ogg,*.wav)\x00*.aac;*.midi;*.mp3;*.ogg;*.wav\x00\x00'),
'Audios (*.aac,*.midi,*.mp3,*.ogg,*.wav,*.m4a)\x00*.aac;*.midi;*.mp3;*.ogg;*.wav;*.m4a\x00\x00'),
);

expect(
Expand Down

0 comments on commit fb05b9e

Please sign in to comment.