feat(ui): polish album folder structure picker bottom sheet

Add a localized description header and Material 3 styling (rounded
corners, scrollable layout, surface color) to the album folder structure
picker in Files settings.
This commit is contained in:
zarzet
2026-06-27 10:46:04 +07:00
parent 8558450378
commit 21fe047e00
36 changed files with 238 additions and 52 deletions
+6
View File
@@ -2954,6 +2954,12 @@ abstract class AppLocalizations {
/// **'Album Folder Structure'**
String get downloadAlbumFolderStructure;
/// Album folder structure picker description
///
/// In en, this message translates to:
/// **'Choose how album folders are structured'**
String get albumFolderStructureDescription;
/// Setting - choose whether artist folders use Album Artist or Track Artist
///
/// In en, this message translates to:
+4
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+4
View File
@@ -1615,6 +1615,10 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album-Ordnerstruktur';
@override
String get albumFolderStructureDescription =>
'Ordnerstruktur für Alben festlegen';
@override
String get downloadUseAlbumArtistForFolders =>
'Album-Künstler für Ordner verwenden';
+4
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+8
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
@@ -6011,6 +6015,10 @@ class AppLocalizationsEsEs extends AppLocalizationsEs {
@override
String get downloadAlbumFolderStructure => 'Estructura de carpeta del álbum';
@override
String get albumFolderStructureDescription =>
'Elige cómo se estructuran las carpetas de los álbumes';
@override
String get downloadUseAlbumArtistForFolders =>
'Usar álbum de artista cómo carpeta';
+4
View File
@@ -1637,6 +1637,10 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Structure du dossier de l\'album';
@override
String get albumFolderStructureDescription =>
'Choisir la structure des dossiers d\'album';
@override
String get downloadUseAlbumArtistForFolders =>
'Utilisez l\'artiste de l\'album pour les dossiers';
+4
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsHi extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+3
View File
@@ -1598,6 +1598,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Struktur Folder Album';
@override
String get albumFolderStructureDescription => 'Pilih struktur folder album';
@override
String get downloadUseAlbumArtistForFolders =>
'Gunakan Artis Album untuk folder';
+3
View File
@@ -1582,6 +1582,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'アルバムフォルダの構造';
@override
String get albumFolderStructureDescription => 'アルバムフォルダの構成を選択';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+4
View File
@@ -1577,6 +1577,10 @@ class AppLocalizationsKo extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+4
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsNl extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+8
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
@@ -6006,6 +6010,10 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
@override
String get downloadAlbumFolderStructure => 'Estrutura da Pasta de Álbum';
@override
String get albumFolderStructureDescription =>
'Escolher a estrutura das pastas dos álbuns';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+4
View File
@@ -1613,6 +1613,10 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Структура папок альбома';
@override
String get albumFolderStructureDescription =>
'Выберите структуру папок альбомов';
@override
String get downloadUseAlbumArtistForFolders =>
'Использовать исполнителя альбома для папок';
+3
View File
@@ -1609,6 +1609,9 @@ class AppLocalizationsTr extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Albüm Klasör Yapısı';
@override
String get albumFolderStructureDescription => 'Albüm klasör yapısını seçin';
@override
String get downloadUseAlbumArtistForFolders =>
'Klasörler için Albüm Sanatçısı\'nı kullan';
+4
View File
@@ -1615,6 +1615,10 @@ class AppLocalizationsUk extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Структура папок альбому';
@override
String get albumFolderStructureDescription =>
'Виберіть структуру папок альбомів';
@override
String get downloadUseAlbumArtistForFolders =>
'Використовувати виконавця альбому для папок';
+12
View File
@@ -1592,6 +1592,10 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
@@ -5976,6 +5980,10 @@ class AppLocalizationsZhCn extends AppLocalizationsZh {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
@@ -10207,6 +10215,10 @@ class AppLocalizationsZhTw extends AppLocalizationsZh {
@override
String get downloadAlbumFolderStructure => 'Album Folder Structure';
@override
String get albumFolderStructureDescription =>
'Choose how album folders are structured';
@override
String get downloadUseAlbumArtistForFolders => 'Use Album Artist for folders';
+4
View File
@@ -2037,6 +2037,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Ordnerstruktur für Alben festlegen",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Album-Künstler für Ordner verwenden",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -2095,6 +2095,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1592,6 +1592,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadSelectQuality": "Select Quality",
"@downloadSelectQuality": {
"description": "Dialog title - choose audio quality"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Elige cómo se estructuran las carpetas de los álbumes",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Usar álbum de artista cómo carpeta",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choisir la structure des dossiers d'album",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Utilisez l'artiste de l'album pour les dossiers",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1800,6 +1800,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Pilih struktur folder album",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Gunakan Artis Album untuk folder",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1756,6 +1756,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "アルバムフォルダの構成を選択",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1592,6 +1592,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadSelectQuality": "Select Quality",
"@downloadSelectQuality": {
"description": "Dialog title - choose audio quality"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Escolher a estrutura das pastas dos álbuns",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Выберите структуру папок альбомов",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Использовать исполнителя альбома для папок",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1892,6 +1892,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Albüm klasör yapısını seçin",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Klasörler için Albüm Sanatçısı'nı kullan",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Виберіть структуру папок альбомів",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Використовувати виконавця альбому для папок",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1592,6 +1592,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadSelectQuality": "Select Quality",
"@downloadSelectQuality": {
"description": "Dialog title - choose audio quality"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+4
View File
@@ -1980,6 +1980,10 @@
"@downloadAlbumFolderStructure": {
"description": "Setting - album folder organization"
},
"albumFolderStructureDescription": "Choose how album folders are structured",
"@albumFolderStructureDescription": {
"description": "Album folder structure picker description"
},
"downloadUseAlbumArtistForFolders": "Use Album Artist for folders",
"@downloadUseAlbumArtistForFolders": {
"description": "Setting - choose whether artist folders use Album Artist or Track Artist"
+83 -52
View File
@@ -734,64 +734,95 @@ class _FilesSettingsPageState extends ConsumerState<FilesSettingsPage> {
WidgetRef ref,
String current,
) {
final colorScheme = Theme.of(context).colorScheme;
showModalBottomSheet<void>(
context: context,
useRootNavigator: true,
backgroundColor: colorScheme.surfaceContainerHigh,
isScrollControlled: true,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(28)),
),
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.7,
),
builder: (context) => SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
for (final option in [
(
'artist_album',
context.l10n.albumFolderArtistAlbum,
context.l10n.albumFolderArtistAlbumSubtitle,
Icons.folder_outlined,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(24, 24, 24, 8),
child: Text(
context.l10n.downloadAlbumFolderStructure,
style: Theme.of(
context,
).textTheme.titleLarge?.copyWith(fontWeight: FontWeight.bold),
),
),
(
'artist_year_album',
context.l10n.albumFolderArtistYearAlbum,
context.l10n.albumFolderArtistYearAlbumSubtitle,
Icons.calendar_today_outlined,
Padding(
padding: const EdgeInsets.fromLTRB(24, 0, 24, 16),
child: Text(
context.l10n.albumFolderStructureDescription,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: colorScheme.onSurfaceVariant,
),
),
),
(
'album_only',
context.l10n.albumFolderAlbumOnly,
context.l10n.albumFolderAlbumOnlySubtitle,
Icons.album_outlined,
),
(
'year_album',
context.l10n.albumFolderYearAlbum,
context.l10n.albumFolderYearAlbumSubtitle,
Icons.event_outlined,
),
(
'artist_album_singles',
context.l10n.albumFolderArtistAlbumSingles,
context.l10n.albumFolderArtistAlbumSinglesSubtitle,
Icons.person_outlined,
),
(
'artist_album_flat',
context.l10n.albumFolderArtistAlbumFlat,
context.l10n.albumFolderArtistAlbumFlatSubtitle,
Icons.person_outline_outlined,
),
])
ListTile(
leading: Icon(option.$4),
title: Text(option.$2),
subtitle: Text(option.$3),
trailing: current == option.$1 ? const Icon(Icons.check) : null,
onTap: () {
ref
.read(settingsProvider.notifier)
.setAlbumFolderStructure(option.$1);
Navigator.pop(context);
},
),
],
for (final option in [
(
'artist_album',
context.l10n.albumFolderArtistAlbum,
context.l10n.albumFolderArtistAlbumSubtitle,
Icons.folder_outlined,
),
(
'artist_year_album',
context.l10n.albumFolderArtistYearAlbum,
context.l10n.albumFolderArtistYearAlbumSubtitle,
Icons.calendar_today_outlined,
),
(
'album_only',
context.l10n.albumFolderAlbumOnly,
context.l10n.albumFolderAlbumOnlySubtitle,
Icons.album_outlined,
),
(
'year_album',
context.l10n.albumFolderYearAlbum,
context.l10n.albumFolderYearAlbumSubtitle,
Icons.event_outlined,
),
(
'artist_album_singles',
context.l10n.albumFolderArtistAlbumSingles,
context.l10n.albumFolderArtistAlbumSinglesSubtitle,
Icons.person_outlined,
),
(
'artist_album_flat',
context.l10n.albumFolderArtistAlbumFlat,
context.l10n.albumFolderArtistAlbumFlatSubtitle,
Icons.person_outline_outlined,
),
])
ListTile(
leading: Icon(option.$4),
title: Text(option.$2),
subtitle: Text(option.$3),
trailing:
current == option.$1 ? const Icon(Icons.check) : null,
onTap: () {
ref
.read(settingsProvider.notifier)
.setAlbumFolderStructure(option.$1);
Navigator.pop(context);
},
),
],
),
),
),
);