diff --git a/lib/data/home1.dart b/lib/data/home1.dart index bdad9de..db00edb 100644 --- a/lib/data/home1.dart +++ b/lib/data/home1.dart @@ -10,12 +10,16 @@ class HomeApi { SharedPreferences prefs = await SharedPreferences.getInstance(); String? countryCode = prefs.getString('countryCode'); if (countryCode == null) { - final response = await get(Uri.parse('http://ip-api.com/json')); - if (response.statusCode == 200) { - Map data = jsonDecode(utf8.decode(response.bodyBytes)); - String countryCode = data['countryCode']; - await prefs.setString('countryCode', countryCode); - } else { + try { + final response = await get(Uri.parse('http://ip-api.com/json')); + if (response.statusCode == 200) { + Map data = jsonDecode(utf8.decode(response.bodyBytes)); + String countryCode = data['countryCode']; + await prefs.setString('countryCode', countryCode); + } else { + await prefs.setString('countryCode', 'IN'); + } + } catch (err) { await prefs.setString('countryCode', 'IN'); } } @@ -89,6 +93,18 @@ class HomeApi { return {}; } + static Future getAlbum(id) async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + String lang = prefs.getString('locale') ?? "en"; + final response = + await get(Uri.parse('$hostAddress/album?id=$id&lang=$lang')); + if (response.statusCode == 200) { + Map data = jsonDecode(utf8.decode(response.bodyBytes)); + return data; + } + return {}; + } + static Future getWatchPlaylist(String videoId, int limit) async { SharedPreferences prefs = await SharedPreferences.getInstance(); String lang = prefs.getString('locale') ?? "en"; diff --git a/lib/generated/intl/messages_af.dart b/lib/generated/intl/messages_af.dart index c550b26..658ebf3 100644 --- a/lib/generated/intl/messages_af.dart +++ b/lib/generated/intl/messages_af.dart @@ -20,39 +20,51 @@ class MessageLookup extends MessageLookupByLibrary { String get localeName => 'af'; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "About" : MessageLookupByLibrary.simpleMessage("Oor"), - "Add_to_favorites" : MessageLookupByLibrary.simpleMessage("Voeg by gunstelinge"), - "Artists" : MessageLookupByLibrary.simpleMessage("Kunstens"), - "Audio_Quality" : MessageLookupByLibrary.simpleMessage("Klankkwaliteit"), - "Change_country" : MessageLookupByLibrary.simpleMessage("Verander Land"), - "Dark_Theme" : MessageLookupByLibrary.simpleMessage("Donker Tema"), - "Dynamic_Theme" : MessageLookupByLibrary.simpleMessage("Dynamiese Tema"), - "Experimental" : MessageLookupByLibrary.simpleMessage("Eksperimenteel"), - "High" : MessageLookupByLibrary.simpleMessage("Hoog"), - "Home" : MessageLookupByLibrary.simpleMessage("Tuis"), - "Language" : MessageLookupByLibrary.simpleMessage("Taal"), - "Low" : MessageLookupByLibrary.simpleMessage("Laag"), - "Medium" : MessageLookupByLibrary.simpleMessage("Medium"), - "My_Favorites" : MessageLookupByLibrary.simpleMessage("My Gunstelinge"), - "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Maak oop in blaaier"), - "Play_All" : MessageLookupByLibrary.simpleMessage("Speel alles"), - "Playlists" : MessageLookupByLibrary.simpleMessage("Snitlyste"), - "RTL" : MessageLookupByLibrary.simpleMessage("Res na links"), - "Remove_from_Queue" : MessageLookupByLibrary.simpleMessage("Verwyder uit waglys"), - "Remove_from_favorites" : MessageLookupByLibrary.simpleMessage("Verwyder uit gunstelinge"), - "Report_an_issue" : MessageLookupByLibrary.simpleMessage("Gee \'n probleem aan"), - "Request_a_feature" : MessageLookupByLibrary.simpleMessage("Versoek \'n kenmerk"), - "Right_to_left_direction" : MessageLookupByLibrary.simpleMessage("Stel teksrigting na regs na links"), - "SOCIALS" : MessageLookupByLibrary.simpleMessage("SOSIALE"), - "Search" : MessageLookupByLibrary.simpleMessage("Soek"), - "Search_something" : MessageLookupByLibrary.simpleMessage("Soek iets"), - "Settings" : MessageLookupByLibrary.simpleMessage("Instellings"), - "Songs" : MessageLookupByLibrary.simpleMessage("Liedjies"), - "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("PROUBLESHOOTING"), - "Tracks" : MessageLookupByLibrary.simpleMessage("Snitte"), - "View_source_code" : MessageLookupByLibrary.simpleMessage("Bekyk bronkode"), - "addToQueue" : MessageLookupByLibrary.simpleMessage("Voeg by waglys"), - "github_redirect" : MessageLookupByLibrary.simpleMessage("Jy sal na Github herlei word") - }; + static _notInlinedMessages(_) => { + "About": MessageLookupByLibrary.simpleMessage("Oor"), + "Add_to_favorites": + MessageLookupByLibrary.simpleMessage("Voeg by gunstelinge"), + "Artists": MessageLookupByLibrary.simpleMessage("Kunstens"), + "Audio_Quality": MessageLookupByLibrary.simpleMessage("Klankkwaliteit"), + "Change_country": MessageLookupByLibrary.simpleMessage("Verander Land"), + "Dark_Theme": MessageLookupByLibrary.simpleMessage("Donker Tema"), + "Dynamic_Theme": MessageLookupByLibrary.simpleMessage("Dynamiese Tema"), + "Experimental": MessageLookupByLibrary.simpleMessage("Eksperimenteel"), + "High": MessageLookupByLibrary.simpleMessage("Hoog"), + "Home": MessageLookupByLibrary.simpleMessage("Tuis"), + "Language": MessageLookupByLibrary.simpleMessage("Taal"), + "Low": MessageLookupByLibrary.simpleMessage("Laag"), + "Medium": MessageLookupByLibrary.simpleMessage("Medium"), + "My_Favorites": MessageLookupByLibrary.simpleMessage("My Gunstelinge"), + "Nothing_Here": MessageLookupByLibrary.simpleMessage("Niks hier"), + "Open_in_Browser": + MessageLookupByLibrary.simpleMessage("Maak oop in blaaier"), + "Play_All": MessageLookupByLibrary.simpleMessage("Speel alles"), + "Playlists": MessageLookupByLibrary.simpleMessage("Snitlyste"), + "RTL": MessageLookupByLibrary.simpleMessage("Res na links"), + "Remove_from_Queue": + MessageLookupByLibrary.simpleMessage("Verwyder uit waglys"), + "Remove_from_favorites": + MessageLookupByLibrary.simpleMessage("Verwyder uit gunstelinge"), + "Report_an_issue": + MessageLookupByLibrary.simpleMessage("Gee 'n probleem aan"), + "Request_a_feature": + MessageLookupByLibrary.simpleMessage("Versoek 'n kenmerk"), + "Right_to_left_direction": MessageLookupByLibrary.simpleMessage( + "Stel teksrigting na regs na links"), + "SOCIALS": MessageLookupByLibrary.simpleMessage("SOSIALE"), + "Search": MessageLookupByLibrary.simpleMessage("Soek"), + "Search_something": MessageLookupByLibrary.simpleMessage("Soek iets"), + "Settings": MessageLookupByLibrary.simpleMessage("Instellings"), + "Songs": MessageLookupByLibrary.simpleMessage("Liedjies"), + "TROUBLESHOOTING": + MessageLookupByLibrary.simpleMessage("PROUBLESHOOTING"), + "Theme": MessageLookupByLibrary.simpleMessage("Tema"), + "Tracks": MessageLookupByLibrary.simpleMessage("Snitte"), + "View_source_code": + MessageLookupByLibrary.simpleMessage("Bekyk bronkode"), + "addToQueue": MessageLookupByLibrary.simpleMessage("Voeg by waglys"), + "github_redirect": + MessageLookupByLibrary.simpleMessage("Jy sal na Github herlei word") + }; } diff --git a/lib/generated/intl/messages_ar.dart b/lib/generated/intl/messages_ar.dart index e9cfb92..902609e 100644 --- a/lib/generated/intl/messages_ar.dart +++ b/lib/generated/intl/messages_ar.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("قليل"), "Medium" : MessageLookupByLibrary.simpleMessage("متوسط"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("مفضلتي"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("لا شيء هنا"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("افتح في المتصفح"), "Play_All" : MessageLookupByLibrary.simpleMessage("لعب كل"), "Playlists" : MessageLookupByLibrary.simpleMessage("قوائم التشغيل"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("إعدادات"), "Songs" : MessageLookupByLibrary.simpleMessage("الأغاني"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("استكشاف الأخطاء وإصلاحها"), + "Theme" : MessageLookupByLibrary.simpleMessage("سمة"), "Tracks" : MessageLookupByLibrary.simpleMessage("المسارات"), "View_source_code" : MessageLookupByLibrary.simpleMessage("عرض كود المصدر"), "addToQueue" : MessageLookupByLibrary.simpleMessage("أضف إلى قائمة الانتظار"), diff --git a/lib/generated/intl/messages_de.dart b/lib/generated/intl/messages_de.dart index b36bf6d..ee1d357 100644 --- a/lib/generated/intl/messages_de.dart +++ b/lib/generated/intl/messages_de.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Schwach"), "Medium" : MessageLookupByLibrary.simpleMessage("Mittel"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("Meine Favoriten"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Nichts hier"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Im Browser öffnen"), "Play_All" : MessageLookupByLibrary.simpleMessage("Alles abspielen"), "Playlists" : MessageLookupByLibrary.simpleMessage("Wiedergabelisten"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Einstellungen"), "Songs" : MessageLookupByLibrary.simpleMessage("Lieder"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("FEHLERBEHEBUNG"), + "Theme" : MessageLookupByLibrary.simpleMessage("Thema"), "Tracks" : MessageLookupByLibrary.simpleMessage("Titel"), "View_source_code" : MessageLookupByLibrary.simpleMessage("Quellcode anzeigen"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Zur Warteschlange hinzufügen"), diff --git a/lib/generated/intl/messages_el.dart b/lib/generated/intl/messages_el.dart index b4342a8..92af71e 100644 --- a/lib/generated/intl/messages_el.dart +++ b/lib/generated/intl/messages_el.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Χαμηλή"), "Medium" : MessageLookupByLibrary.simpleMessage("Μέτρια"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("Τα αγαπημένα μου"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Τίποτα εδώ"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Άνοιγμα σε πρόγραμμα περιήγησης"), "Play_All" : MessageLookupByLibrary.simpleMessage("Αναπαραγωγή όλων"), "Playlists" : MessageLookupByLibrary.simpleMessage("Λίστες αναπαραγωγής"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Ρυθμίσεις"), "Songs" : MessageLookupByLibrary.simpleMessage("Τραγούδια"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("ΑΝΤΙΜΕΤΏΠΙΣΗ ΠΡΟΒΛΗΜΆΤΩΝ"), + "Theme" : MessageLookupByLibrary.simpleMessage("Θέμα"), "Tracks" : MessageLookupByLibrary.simpleMessage("Τραγούδια"), "View_source_code" : MessageLookupByLibrary.simpleMessage("Προβολή πηγαίου κώδικα"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Προσθήκη στην ουρά"), diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 578968a..b2503de 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Low"), "Medium" : MessageLookupByLibrary.simpleMessage("Medium"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("My Favorites"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Nothing Here"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Open in Browser"), "Play_All" : MessageLookupByLibrary.simpleMessage("Play All"), "Playlists" : MessageLookupByLibrary.simpleMessage("Playlists"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Settings"), "Songs" : MessageLookupByLibrary.simpleMessage("Songs"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("TROUBLESHOOTING"), + "Theme" : MessageLookupByLibrary.simpleMessage("Theme"), "Tracks" : MessageLookupByLibrary.simpleMessage("Tracks"), "View_source_code" : MessageLookupByLibrary.simpleMessage("View source Code"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Add to Queue"), diff --git a/lib/generated/intl/messages_es.dart b/lib/generated/intl/messages_es.dart index 97a7390..c1e12b7 100644 --- a/lib/generated/intl/messages_es.dart +++ b/lib/generated/intl/messages_es.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Bajo"), "Medium" : MessageLookupByLibrary.simpleMessage("Medio"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("Mis favoritos"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Nada aquí"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Abierto en el navegador"), "Play_All" : MessageLookupByLibrary.simpleMessage("Jugar todo"), "Playlists" : MessageLookupByLibrary.simpleMessage("listas de reproducción"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Ajustes"), "Songs" : MessageLookupByLibrary.simpleMessage("Canciones"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("SOLUCIÓN DE PROBLEMAS"), + "Theme" : MessageLookupByLibrary.simpleMessage("Temática"), "Tracks" : MessageLookupByLibrary.simpleMessage("Pistas"), "View_source_code" : MessageLookupByLibrary.simpleMessage("Ver código fuente"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Añadir a la cola"), diff --git a/lib/generated/intl/messages_fr.dart b/lib/generated/intl/messages_fr.dart index 39b2379..59337bd 100644 --- a/lib/generated/intl/messages_fr.dart +++ b/lib/generated/intl/messages_fr.dart @@ -20,39 +20,54 @@ class MessageLookup extends MessageLookupByLibrary { String get localeName => 'fr'; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "About" : MessageLookupByLibrary.simpleMessage("À propos"), - "Add_to_favorites" : MessageLookupByLibrary.simpleMessage("Ajouter aux Favoris"), - "Artists" : MessageLookupByLibrary.simpleMessage("Artistes"), - "Audio_Quality" : MessageLookupByLibrary.simpleMessage("Qualité audio"), - "Change_country" : MessageLookupByLibrary.simpleMessage("Changer de pays"), - "Dark_Theme" : MessageLookupByLibrary.simpleMessage("Thème sombre"), - "Dynamic_Theme" : MessageLookupByLibrary.simpleMessage("Thème dynamique"), - "Experimental" : MessageLookupByLibrary.simpleMessage("Expérimental"), - "High" : MessageLookupByLibrary.simpleMessage("Haut"), - "Home" : MessageLookupByLibrary.simpleMessage("Domicile"), - "Language" : MessageLookupByLibrary.simpleMessage("Langue"), - "Low" : MessageLookupByLibrary.simpleMessage("Faible"), - "Medium" : MessageLookupByLibrary.simpleMessage("Moyen"), - "My_Favorites" : MessageLookupByLibrary.simpleMessage("Mes favoris"), - "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Ouvrir dans le navigateur"), - "Play_All" : MessageLookupByLibrary.simpleMessage("Jouer à tous"), - "Playlists" : MessageLookupByLibrary.simpleMessage("Listes de lecture"), - "RTL" : MessageLookupByLibrary.simpleMessage("De droite à gauche"), - "Remove_from_Queue" : MessageLookupByLibrary.simpleMessage("Supprimer de la file d\'attente"), - "Remove_from_favorites" : MessageLookupByLibrary.simpleMessage("Retirer des favoris"), - "Report_an_issue" : MessageLookupByLibrary.simpleMessage("Signaler un problème"), - "Request_a_feature" : MessageLookupByLibrary.simpleMessage("Demander une fonctionnalité"), - "Right_to_left_direction" : MessageLookupByLibrary.simpleMessage("Définir la direction du texte de droite à gauche"), - "SOCIALS" : MessageLookupByLibrary.simpleMessage("SOCIAUX"), - "Search" : MessageLookupByLibrary.simpleMessage("Chercher"), - "Search_something" : MessageLookupByLibrary.simpleMessage("Rechercher quelque chose"), - "Settings" : MessageLookupByLibrary.simpleMessage("Réglages"), - "Songs" : MessageLookupByLibrary.simpleMessage("Chansons"), - "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("DÉPANNAGE"), - "Tracks" : MessageLookupByLibrary.simpleMessage("Des pistes"), - "View_source_code" : MessageLookupByLibrary.simpleMessage("Afficher le code source"), - "addToQueue" : MessageLookupByLibrary.simpleMessage("Ajouter à la liste"), - "github_redirect" : MessageLookupByLibrary.simpleMessage("Vous allez être redirigé vers Github") - }; + static _notInlinedMessages(_) => { + "About": MessageLookupByLibrary.simpleMessage("À propos"), + "Add_to_favorites": + MessageLookupByLibrary.simpleMessage("Ajouter aux Favoris"), + "Artists": MessageLookupByLibrary.simpleMessage("Artistes"), + "Audio_Quality": MessageLookupByLibrary.simpleMessage("Qualité audio"), + "Change_country": + MessageLookupByLibrary.simpleMessage("Changer de pays"), + "Dark_Theme": MessageLookupByLibrary.simpleMessage("Thème sombre"), + "Dynamic_Theme": + MessageLookupByLibrary.simpleMessage("Thème dynamique"), + "Experimental": MessageLookupByLibrary.simpleMessage("Expérimental"), + "High": MessageLookupByLibrary.simpleMessage("Haut"), + "Home": MessageLookupByLibrary.simpleMessage("Domicile"), + "Language": MessageLookupByLibrary.simpleMessage("Langue"), + "Low": MessageLookupByLibrary.simpleMessage("Faible"), + "Medium": MessageLookupByLibrary.simpleMessage("Moyen"), + "My_Favorites": MessageLookupByLibrary.simpleMessage("Mes favoris"), + "Nothing_Here": MessageLookupByLibrary.simpleMessage("Rien ici"), + "Open_in_Browser": + MessageLookupByLibrary.simpleMessage("Ouvrir dans le navigateur"), + "Play_All": MessageLookupByLibrary.simpleMessage("Jouer à tous"), + "Playlists": MessageLookupByLibrary.simpleMessage("Listes de lecture"), + "RTL": MessageLookupByLibrary.simpleMessage("De droite à gauche"), + "Remove_from_Queue": MessageLookupByLibrary.simpleMessage( + "Supprimer de la file d'attente"), + "Remove_from_favorites": + MessageLookupByLibrary.simpleMessage("Retirer des favoris"), + "Report_an_issue": + MessageLookupByLibrary.simpleMessage("Signaler un problème"), + "Request_a_feature": + MessageLookupByLibrary.simpleMessage("Demander une fonctionnalité"), + "Right_to_left_direction": MessageLookupByLibrary.simpleMessage( + "Définir la direction du texte de droite à gauche"), + "SOCIALS": MessageLookupByLibrary.simpleMessage("SOCIAUX"), + "Search": MessageLookupByLibrary.simpleMessage("Chercher"), + "Search_something": + MessageLookupByLibrary.simpleMessage("Rechercher quelque chose"), + "Settings": MessageLookupByLibrary.simpleMessage("Réglages"), + "Songs": MessageLookupByLibrary.simpleMessage("Chansons"), + "TROUBLESHOOTING": MessageLookupByLibrary.simpleMessage("DÉPANNAGE"), + "Theme": MessageLookupByLibrary.simpleMessage("Thème"), + "Tracks": MessageLookupByLibrary.simpleMessage("Des pistes"), + "View_source_code": + MessageLookupByLibrary.simpleMessage("Afficher le code source"), + "addToQueue": + MessageLookupByLibrary.simpleMessage("Ajouter à la liste"), + "github_redirect": MessageLookupByLibrary.simpleMessage( + "Vous allez être redirigé vers Github") + }; } diff --git a/lib/generated/intl/messages_hi.dart b/lib/generated/intl/messages_hi.dart index f39211d..1af93d9 100644 --- a/lib/generated/intl/messages_hi.dart +++ b/lib/generated/intl/messages_hi.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("कम"), "Medium" : MessageLookupByLibrary.simpleMessage("मध्यम"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("मेरे प्रिय"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("यहाँ कुछ नहीं"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("ब्राउज़र में खोलें"), "Play_All" : MessageLookupByLibrary.simpleMessage("सभी को बजाएं"), "Playlists" : MessageLookupByLibrary.simpleMessage("प्लेलिस्ट"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("समायोजन"), "Songs" : MessageLookupByLibrary.simpleMessage("गीत"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("समस्या निवारण"), + "Theme" : MessageLookupByLibrary.simpleMessage("थीम"), "Tracks" : MessageLookupByLibrary.simpleMessage("पटरियों"), "View_source_code" : MessageLookupByLibrary.simpleMessage("स्रोत कोड देखें"), "addToQueue" : MessageLookupByLibrary.simpleMessage("क़तार में जोड़ें"), diff --git a/lib/generated/intl/messages_ja.dart b/lib/generated/intl/messages_ja.dart index a675f2a..c9202af 100644 --- a/lib/generated/intl/messages_ja.dart +++ b/lib/generated/intl/messages_ja.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("低"), "Medium" : MessageLookupByLibrary.simpleMessage("中"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("私のお気に入り"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("ここには何もない"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("ブラウザで開く"), "Play_All" : MessageLookupByLibrary.simpleMessage("すべて再生"), "Playlists" : MessageLookupByLibrary.simpleMessage("プレイリスト"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("設定"), "Songs" : MessageLookupByLibrary.simpleMessage("曲"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("トラブルシューティング"), + "Theme" : MessageLookupByLibrary.simpleMessage("テーマ"), "Tracks" : MessageLookupByLibrary.simpleMessage("トラック"), "View_source_code" : MessageLookupByLibrary.simpleMessage("ソースコードを表示"), "addToQueue" : MessageLookupByLibrary.simpleMessage("キューに追加"), diff --git a/lib/generated/intl/messages_ko.dart b/lib/generated/intl/messages_ko.dart index b9227ce..c41d786 100644 --- a/lib/generated/intl/messages_ko.dart +++ b/lib/generated/intl/messages_ko.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("낮음"), "Medium" : MessageLookupByLibrary.simpleMessage("중간"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("내가 좋아하는 것들"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("여기 아무것도"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("브라우저에서 열기"), "Play_All" : MessageLookupByLibrary.simpleMessage("모두 재생"), "Playlists" : MessageLookupByLibrary.simpleMessage("재생목록"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("설정"), "Songs" : MessageLookupByLibrary.simpleMessage("노래"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("문제 해결"), + "Theme" : MessageLookupByLibrary.simpleMessage("주제"), "Tracks" : MessageLookupByLibrary.simpleMessage("트랙"), "View_source_code" : MessageLookupByLibrary.simpleMessage("소스 코드 보기"), "addToQueue" : MessageLookupByLibrary.simpleMessage("대기열에 추가"), diff --git a/lib/generated/intl/messages_pt.dart b/lib/generated/intl/messages_pt.dart index b17135b..eb70344 100644 --- a/lib/generated/intl/messages_pt.dart +++ b/lib/generated/intl/messages_pt.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Baixo"), "Medium" : MessageLookupByLibrary.simpleMessage("Médio"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("Meus favoritos"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Nada aqui"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Abra no navegador"), "Play_All" : MessageLookupByLibrary.simpleMessage("Jogar tudo"), "Playlists" : MessageLookupByLibrary.simpleMessage("listas de reprodução"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Definições"), "Songs" : MessageLookupByLibrary.simpleMessage("Músicas"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("SOLUÇÃO DE PROBLEMAS"), + "Theme" : MessageLookupByLibrary.simpleMessage("Tema"), "Tracks" : MessageLookupByLibrary.simpleMessage("Faixas"), "View_source_code" : MessageLookupByLibrary.simpleMessage("Ver código-fonte"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Adicionar à fila"), diff --git a/lib/generated/intl/messages_ru.dart b/lib/generated/intl/messages_ru.dart index 06be4cc..1f63d5f 100644 --- a/lib/generated/intl/messages_ru.dart +++ b/lib/generated/intl/messages_ru.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("Низкий"), "Medium" : MessageLookupByLibrary.simpleMessage("Середина"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("Мои любимые"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("Здесь ничего"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Открыть в браузере"), "Play_All" : MessageLookupByLibrary.simpleMessage("Играть все"), "Playlists" : MessageLookupByLibrary.simpleMessage("Плейлисты"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("Настройки"), "Songs" : MessageLookupByLibrary.simpleMessage("Песни"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("ИСПРАВЛЕНИЕ ПРОБЛЕМ"), + "Theme" : MessageLookupByLibrary.simpleMessage("Тема"), "Tracks" : MessageLookupByLibrary.simpleMessage("Треки"), "View_source_code" : MessageLookupByLibrary.simpleMessage("Посмотреть исходный код"), "addToQueue" : MessageLookupByLibrary.simpleMessage("Добавить в очередь"), diff --git a/lib/generated/intl/messages_tr.dart b/lib/generated/intl/messages_tr.dart index c814172..b1d19c9 100644 --- a/lib/generated/intl/messages_tr.dart +++ b/lib/generated/intl/messages_tr.dart @@ -20,39 +20,50 @@ class MessageLookup extends MessageLookupByLibrary { String get localeName => 'tr'; final messages = _notInlinedMessages(_notInlinedMessages); - static _notInlinedMessages(_) => { - "About" : MessageLookupByLibrary.simpleMessage("Hakkında"), - "Add_to_favorites" : MessageLookupByLibrary.simpleMessage("Favorilere ekle"), - "Artists" : MessageLookupByLibrary.simpleMessage("Sanatçılar"), - "Audio_Quality" : MessageLookupByLibrary.simpleMessage("Ses Kalitesi"), - "Change_country" : MessageLookupByLibrary.simpleMessage("Ülke değiştir"), - "Dark_Theme" : MessageLookupByLibrary.simpleMessage("Karanlık Tema"), - "Dynamic_Theme" : MessageLookupByLibrary.simpleMessage("Dinamik Tema"), - "Experimental" : MessageLookupByLibrary.simpleMessage("Deneysel"), - "High" : MessageLookupByLibrary.simpleMessage("Yüksek"), - "Home" : MessageLookupByLibrary.simpleMessage("Anasayfa"), - "Language" : MessageLookupByLibrary.simpleMessage("Dil"), - "Low" : MessageLookupByLibrary.simpleMessage("Düşük"), - "Medium" : MessageLookupByLibrary.simpleMessage("Orta"), - "My_Favorites" : MessageLookupByLibrary.simpleMessage("Favorilerim"), - "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("Tarayıcıda Aç"), - "Play_All" : MessageLookupByLibrary.simpleMessage("Hepsini Oynat"), - "Playlists" : MessageLookupByLibrary.simpleMessage("Oynatma listeleri"), - "RTL" : MessageLookupByLibrary.simpleMessage("Sağdan sola"), - "Remove_from_Queue" : MessageLookupByLibrary.simpleMessage("Sıradan Kaldır"), - "Remove_from_favorites" : MessageLookupByLibrary.simpleMessage("Favorilerden çıkar"), - "Report_an_issue" : MessageLookupByLibrary.simpleMessage("Sorun bildir"), - "Request_a_feature" : MessageLookupByLibrary.simpleMessage("Özellik talep et"), - "Right_to_left_direction" : MessageLookupByLibrary.simpleMessage("Metin yönünü Sağdan sola olarak ayarla"), - "SOCIALS" : MessageLookupByLibrary.simpleMessage("SOSYAL YÖNTEMLER"), - "Search" : MessageLookupByLibrary.simpleMessage("Ara"), - "Search_something" : MessageLookupByLibrary.simpleMessage("bir şey ara"), - "Settings" : MessageLookupByLibrary.simpleMessage("Ayarlar"), - "Songs" : MessageLookupByLibrary.simpleMessage("Şarkılar"), - "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("SORUN GİDER"), - "Tracks" : MessageLookupByLibrary.simpleMessage("Parçalar"), - "View_source_code" : MessageLookupByLibrary.simpleMessage("Kaynak kodunu görüntüle"), - "addToQueue" : MessageLookupByLibrary.simpleMessage("Sıraya ekle"), - "github_redirect" : MessageLookupByLibrary.simpleMessage("Github\'a yönlendirileceksiniz") - }; + static _notInlinedMessages(_) => { + "About": MessageLookupByLibrary.simpleMessage("Hakkında"), + "Add_to_favorites": + MessageLookupByLibrary.simpleMessage("Favorilere ekle"), + "Artists": MessageLookupByLibrary.simpleMessage("Sanatçılar"), + "Audio_Quality": MessageLookupByLibrary.simpleMessage("Ses Kalitesi"), + "Change_country": MessageLookupByLibrary.simpleMessage("Ülke değiştir"), + "Dark_Theme": MessageLookupByLibrary.simpleMessage("Karanlık Tema"), + "Dynamic_Theme": MessageLookupByLibrary.simpleMessage("Dinamik Tema"), + "Experimental": MessageLookupByLibrary.simpleMessage("Deneysel"), + "High": MessageLookupByLibrary.simpleMessage("Yüksek"), + "Home": MessageLookupByLibrary.simpleMessage("Anasayfa"), + "Language": MessageLookupByLibrary.simpleMessage("Dil"), + "Low": MessageLookupByLibrary.simpleMessage("Düşük"), + "Medium": MessageLookupByLibrary.simpleMessage("Orta"), + "My_Favorites": MessageLookupByLibrary.simpleMessage("Favorilerim"), + "Nothing_Here": + MessageLookupByLibrary.simpleMessage("Burada hiçbir şey"), + "Open_in_Browser": + MessageLookupByLibrary.simpleMessage("Tarayıcıda Aç"), + "Play_All": MessageLookupByLibrary.simpleMessage("Hepsini Oynat"), + "Playlists": MessageLookupByLibrary.simpleMessage("Oynatma listeleri"), + "RTL": MessageLookupByLibrary.simpleMessage("Sağdan sola"), + "Remove_from_Queue": + MessageLookupByLibrary.simpleMessage("Sıradan Kaldır"), + "Remove_from_favorites": + MessageLookupByLibrary.simpleMessage("Favorilerden çıkar"), + "Report_an_issue": MessageLookupByLibrary.simpleMessage("Sorun bildir"), + "Request_a_feature": + MessageLookupByLibrary.simpleMessage("Özellik talep et"), + "Right_to_left_direction": MessageLookupByLibrary.simpleMessage( + "Metin yönünü Sağdan sola olarak ayarla"), + "SOCIALS": MessageLookupByLibrary.simpleMessage("SOSYAL YÖNTEMLER"), + "Search": MessageLookupByLibrary.simpleMessage("Ara"), + "Search_something": MessageLookupByLibrary.simpleMessage("bir şey ara"), + "Settings": MessageLookupByLibrary.simpleMessage("Ayarlar"), + "Songs": MessageLookupByLibrary.simpleMessage("Şarkılar"), + "TROUBLESHOOTING": MessageLookupByLibrary.simpleMessage("SORUN GİDER"), + "Theme": MessageLookupByLibrary.simpleMessage("Tema"), + "Tracks": MessageLookupByLibrary.simpleMessage("Parçalar"), + "View_source_code": + MessageLookupByLibrary.simpleMessage("Kaynak kodunu görüntüle"), + "addToQueue": MessageLookupByLibrary.simpleMessage("Sıraya ekle"), + "github_redirect": MessageLookupByLibrary.simpleMessage( + "Github'a yönlendirileceksiniz") + }; } diff --git a/lib/generated/intl/messages_ur.dart b/lib/generated/intl/messages_ur.dart index c825de1..63ffe32 100644 --- a/lib/generated/intl/messages_ur.dart +++ b/lib/generated/intl/messages_ur.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("کم"), "Medium" : MessageLookupByLibrary.simpleMessage("درمیانہ"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("میرے پسندیدہ"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("یہاں کچھ نہیں ہے"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("براؤزر میں کھولیں"), "Play_All" : MessageLookupByLibrary.simpleMessage("سارے چلائیں"), "Playlists" : MessageLookupByLibrary.simpleMessage("پلے لسٹس"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("ترتیبات"), "Songs" : MessageLookupByLibrary.simpleMessage("گانے"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("خرابیوں کا سراغ لگانا"), + "Theme" : MessageLookupByLibrary.simpleMessage("خیالیہ"), "Tracks" : MessageLookupByLibrary.simpleMessage("ٹریکس"), "View_source_code" : MessageLookupByLibrary.simpleMessage("سورس کوڈ دیکھیں"), "addToQueue" : MessageLookupByLibrary.simpleMessage("قطار میں شامل کریں"), diff --git a/lib/generated/intl/messages_zh.dart b/lib/generated/intl/messages_zh.dart index cbd8cb4..9047f9b 100644 --- a/lib/generated/intl/messages_zh.dart +++ b/lib/generated/intl/messages_zh.dart @@ -35,6 +35,7 @@ class MessageLookup extends MessageLookupByLibrary { "Low" : MessageLookupByLibrary.simpleMessage("低的"), "Medium" : MessageLookupByLibrary.simpleMessage("中等的"), "My_Favorites" : MessageLookupByLibrary.simpleMessage("我最喜欢的"), + "Nothing_Here" : MessageLookupByLibrary.simpleMessage("这里没有什么"), "Open_in_Browser" : MessageLookupByLibrary.simpleMessage("在浏览器中打开"), "Play_All" : MessageLookupByLibrary.simpleMessage("全部播放"), "Playlists" : MessageLookupByLibrary.simpleMessage("播放列表"), @@ -50,6 +51,7 @@ class MessageLookup extends MessageLookupByLibrary { "Settings" : MessageLookupByLibrary.simpleMessage("设置"), "Songs" : MessageLookupByLibrary.simpleMessage("歌曲"), "TROUBLESHOOTING" : MessageLookupByLibrary.simpleMessage("故障排除"), + "Theme" : MessageLookupByLibrary.simpleMessage("主题"), "Tracks" : MessageLookupByLibrary.simpleMessage("曲目"), "View_source_code" : MessageLookupByLibrary.simpleMessage("查看源代码"), "addToQueue" : MessageLookupByLibrary.simpleMessage("添加到队列"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 2113ee1..7f55508 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -376,6 +376,26 @@ class S { args: [], ); } + + /// `Theme` + String get Theme { + return Intl.message( + 'Theme', + name: 'Theme', + desc: '', + args: [], + ); + } + + /// `Nothing Here` + String get Nothing_Here { + return Intl.message( + 'Nothing Here', + name: 'Nothing_Here', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/intl_af.arb b/lib/l10n/intl_af.arb index 8fda29f..1195970 100644 --- a/lib/l10n/intl_af.arb +++ b/lib/l10n/intl_af.arb @@ -31,5 +31,7 @@ "My_Favorites":"My Gunstelinge", "Remove_from_Queue":"Verwyder uit waglys", "Remove_from_favorites":"Verwyder uit gunstelinge", - "Add_to_favorites":"Voeg by gunstelinge" + "Add_to_favorites":"Voeg by gunstelinge", + "Theme":"Tema", + "Nothing_Here":"Niks hier" } diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb index fc1f4d8..118f23c 100644 --- a/lib/l10n/intl_ar.arb +++ b/lib/l10n/intl_ar.arb @@ -32,5 +32,7 @@ "My_Favorites":"مفضلتي", "Remove_from_Queue":"إزالة من قائمة الانتظار", "Remove_from_favorites":"إزالة من المفضلة", - "Add_to_favorites":"اضافة الى المفضلة" + "Add_to_favorites":"اضافة الى المفضلة", + "Theme":"سمة", + "Nothing_Here":"لا شيء هنا" } diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 8c3388e..8224b11 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -31,5 +31,7 @@ "My_Favorites":"Meine Favoriten", "Remove_from_Queue":"Aus Warteschlange entfernen", "Remove_from_favorites":"Von Favoriten entfernen", - "Add_to_favorites":"Zu den Favoriten hinzufügen" + "Add_to_favorites":"Zu den Favoriten hinzufügen", + "Theme":"Thema", + "Nothing_Here":"Nichts hier" } \ No newline at end of file diff --git a/lib/l10n/intl_el.arb b/lib/l10n/intl_el.arb index bcb3223..0cd8236 100644 --- a/lib/l10n/intl_el.arb +++ b/lib/l10n/intl_el.arb @@ -31,5 +31,7 @@ "My_Favorites":"Τα αγαπημένα μου", "Remove_from_Queue":"Κατάργηση από την ουρά", "Remove_from_favorites":"Αφαίρεση από τα Αγαπημένα", - "Add_to_favorites":"Προσθήκη στα αγαπημένα" + "Add_to_favorites":"Προσθήκη στα αγαπημένα", + "Theme":"Θέμα", + "Nothing_Here":"Τίποτα εδώ" } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index a1cb3e0..cc2fa2d 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -31,5 +31,7 @@ "My_Favorites":"My Favorites", "Remove_from_Queue":"Remove from Queue", "Remove_from_favorites":"Remove from Favorites", - "Add_to_favorites":"Add to Favorites" + "Add_to_favorites":"Add to Favorites", + "Theme":"Theme", + "Nothing_Here":"Nothing Here" } \ No newline at end of file diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 014815a..0979d69 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -31,5 +31,7 @@ "My_Favorites":"Mis favoritos", "Remove_from_Queue":"Eliminar de la cola", "Remove_from_favorites":"Quitar de favoritos", - "Add_to_favorites":"Agregar a los favoritos" + "Add_to_favorites":"Agregar a los favoritos", + "Theme":"Temática", + "Nothing_Here":"Nada aquí" } \ No newline at end of file diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 82cc8df..1f7871c 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -31,5 +31,7 @@ "My_Favorites":"Mes favoris", "Remove_from_Queue":"Supprimer de la file d'attente", "Remove_from_favorites":"Retirer des favoris", - "Add_to_favorites":"Ajouter aux Favoris" + "Add_to_favorites":"Ajouter aux Favoris", + "Theme":"Thème", + "Nothing_Here":"Rien ici" } \ No newline at end of file diff --git a/lib/l10n/intl_hi.arb b/lib/l10n/intl_hi.arb index 06d60e0..626689b 100644 --- a/lib/l10n/intl_hi.arb +++ b/lib/l10n/intl_hi.arb @@ -31,5 +31,7 @@ "My_Favorites":"मेरे प्रिय", "Remove_from_Queue":"कतार से हटाएं", "Remove_from_favorites":"पसंदीदा से निकालें", - "Add_to_favorites":"पसंदीदा में जोड़े" + "Add_to_favorites":"पसंदीदा में जोड़े", + "Theme":"थीम", + "Nothing_Here":"यहाँ कुछ नहीं" } \ No newline at end of file diff --git a/lib/l10n/intl_ja.arb b/lib/l10n/intl_ja.arb index b0b2432..af457d0 100644 --- a/lib/l10n/intl_ja.arb +++ b/lib/l10n/intl_ja.arb @@ -31,5 +31,7 @@ "My_Favorites":"私のお気に入り", "Remove_from_Queue":"キューから削除", "Remove_from_favorites":"お気に入りから削除", - "Add_to_favorites":"お気に入りに追加" + "Add_to_favorites":"お気に入りに追加", + "Theme":"テーマ", + "Nothing_Here":"ここには何もない" } \ No newline at end of file diff --git a/lib/l10n/intl_ko.arb b/lib/l10n/intl_ko.arb index bfab6d7..141c8cd 100644 --- a/lib/l10n/intl_ko.arb +++ b/lib/l10n/intl_ko.arb @@ -31,5 +31,7 @@ "My_Favorites":"내가 좋아하는 것들", "Remove_from_Queue":"대기열에서 제거", "Remove_from_favorites":"즐겨 찾기에서 삭제하기", - "Add_to_favorites":"즐겨 찾기에 추가" + "Add_to_favorites":"즐겨 찾기에 추가", + "Theme":"주제", + "Nothing_Here":"여기 아무것도" } diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 0594b37..fd71494 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -31,5 +31,7 @@ "My_Favorites":"Meus favoritos", "Remove_from_Queue":"Remover da Fila", "Remove_from_favorites":"Remover dos favoritos", - "Add_to_favorites":"Adicionar aos favoritos" + "Add_to_favorites":"Adicionar aos favoritos", + "Theme":"Tema", + "Nothing_Here":"Nada aqui" } \ No newline at end of file diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index 1cfcae9..a8c3612 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -31,5 +31,7 @@ "My_Favorites":"Мои любимые", "Remove_from_Queue":"Удалить из очереди", "Remove_from_favorites":"Удалить из Избранного", - "Add_to_favorites":"Добавить в избранное" + "Add_to_favorites":"Добавить в избранное", + "Theme":"Тема", + "Nothing_Here":"Здесь ничего" } \ No newline at end of file diff --git a/lib/l10n/intl_tr.arb b/lib/l10n/intl_tr.arb index b0b5091..41d04bc 100644 --- a/lib/l10n/intl_tr.arb +++ b/lib/l10n/intl_tr.arb @@ -31,5 +31,7 @@ "My_Favorites":"Favorilerim", "Remove_from_Queue":"Sıradan Kaldır", "Remove_from_favorites":"Favorilerden çıkar", - "Add_to_favorites":"Favorilere ekle" + "Add_to_favorites":"Favorilere ekle", + "Theme":"Tema", + "Nothing_Here":"Burada hiçbir şey" } diff --git a/lib/l10n/intl_ur.arb b/lib/l10n/intl_ur.arb index b6947e4..c2e5871 100644 --- a/lib/l10n/intl_ur.arb +++ b/lib/l10n/intl_ur.arb @@ -31,5 +31,7 @@ "My_Favorites":"میرے پسندیدہ", "Remove_from_Queue":"قطار سے ہٹا دیں", "Remove_from_favorites":"پسندیدہ سے ہٹا دیں", - "Add_to_favorites":"پسندیدہ میں شامل کریں" + "Add_to_favorites":"پسندیدہ میں شامل کریں", + "Theme":"خیالیہ", + "Nothing_Here":"یہاں کچھ نہیں ہے" } \ No newline at end of file diff --git a/lib/l10n/intl_zh.arb b/lib/l10n/intl_zh.arb index 3b49aba..4e16938 100644 --- a/lib/l10n/intl_zh.arb +++ b/lib/l10n/intl_zh.arb @@ -31,5 +31,7 @@ "My_Favorites":"我最喜欢的", "Remove_from_Queue":"从队列中移除", "Remove_from_favorites":"从收藏夹中删除", - "Add_to_favorites":"添加到收藏夹" + "Add_to_favorites":"添加到收藏夹", + "Theme":"主题", + "Nothing_Here":"这里没有什么" } diff --git a/lib/main.dart b/lib/main.dart index 10d7255..7eec0c2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,3 @@ -import 'package:country_picker/country_picker.dart'; import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -58,25 +57,29 @@ class MyApp extends StatelessWidget { theme: context.watch().lightTheme.copyWith( colorScheme: context.watch().dynamicThemeMode ? ColorScheme.fromSwatch( - primarySwatch: createMaterialColor( - song?.colorPalette?.lightMutedColor ?? - const Color.fromARGB(255, 136, 240, 196))) + primarySwatch: createMaterialColor(song + ?.colorPalette?.lightMutedColor ?? + context.watch().primaryColor.light)) : lightDynamic ?? ColorScheme.fromSwatch( - primarySwatch: createMaterialColor( - const Color.fromARGB(255, 136, 240, 196))) + primarySwatch: createMaterialColor(context + .watch() + .primaryColor + .light)) .harmonized(), ), darkTheme: context.watch().darkTheme.copyWith( colorScheme: context.watch().dynamicThemeMode ? ColorScheme.fromSwatch( - primarySwatch: createMaterialColor( - song?.colorPalette?.darkMutedColor ?? - const Color.fromARGB(255, 80, 141, 115))) + primarySwatch: createMaterialColor(song + ?.colorPalette?.darkMutedColor ?? + context.watch().primaryColor.dark)) : darkDynamic ?? (ColorScheme.fromSwatch( - primarySwatch: createMaterialColor( - const Color.fromARGB(255, 80, 141, 115)))), + primarySwatch: createMaterialColor(context + .watch() + .primaryColor + .dark))), ), themeMode: context.watch().themeMode, home: const Directionality( diff --git a/lib/providers/MusicPlayer.dart b/lib/providers/MusicPlayer.dart index bc68e6c..9c2a5d3 100644 --- a/lib/providers/MusicPlayer.dart +++ b/lib/providers/MusicPlayer.dart @@ -1,8 +1,5 @@ import 'dart:async'; -// import 'dart:developer'; -// _player.sequenceState?.effectiveSequence -// .map((e) => e.tag.extras['track'] as Track) -// .toList() + import 'package:flutter/cupertino.dart'; import 'package:just_audio/just_audio.dart'; import 'package:just_audio_background/just_audio_background.dart'; @@ -37,7 +34,7 @@ class MusicPlayer extends ChangeNotifier { _isPlaying = _player.playing; _player.setAudioSource(playlist!, initialIndex: 0, initialPosition: Duration.zero, preload: false); - init(); + _player.playerStateStream.listen((state) async { _index = _player.currentIndex ?? 0; }); diff --git a/lib/providers/ThemeProvider.dart b/lib/providers/ThemeProvider.dart index fff4906..0e8a1f3 100644 --- a/lib/providers/ThemeProvider.dart +++ b/lib/providers/ThemeProvider.dart @@ -1,14 +1,12 @@ -import 'dart:developer'; - -import 'package:flutter/cupertino.dart'; +import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import '../utils/colors.dart'; - class ThemeProvider extends ChangeNotifier { + PrimaryColor _primaryColor = PrimaryColor( + light: const Color(0xffb9f6ca), dark: const Color(0xff00c853)); String _themeMode = "light"; bool _dynamicThemeMode = false; ThemeData _currentTheme = _lightTheme; @@ -17,10 +15,18 @@ class ThemeProvider extends ChangeNotifier { ThemeProvider(this._prefs) { String? thememode = _prefs.getString('themeMode'); bool? dynamicThemeMode = _prefs.getBool('dynamicThemeMode'); + + Color primaryColorLight = Color( + _prefs.getInt('primaryColorLight') ?? const Color(0xffb9f6ca).value); + Color primaryColorDark = Color( + _prefs.getInt('primaryColorDark') ?? const Color(0xff00c853).value); + _themeMode = thememode ?? "light"; _dynamicThemeMode = dynamicThemeMode ?? false; _currentTheme = _themeMode == "light" ? lightTheme : darkTheme; + _primaryColor = + PrimaryColor(light: primaryColorLight, dark: primaryColorDark); } ThemeData get theme => _currentTheme; ThemeData get lightTheme => _lightTheme; @@ -28,6 +34,7 @@ class ThemeProvider extends ChangeNotifier { bool get dynamicThemeMode => _dynamicThemeMode; ThemeMode get themeMode => _themeMode == 'dark' ? ThemeMode.dark : ThemeMode.light; + PrimaryColor get primaryColor => _primaryColor; setDynamicThemeMode(bool dynamicThemeMode) { _dynamicThemeMode = dynamicThemeMode; @@ -45,6 +52,13 @@ class ThemeProvider extends ChangeNotifier { } _prefs.setString('themeMode', themeMode); } + + setPrimaryColor(PrimaryColor primaryColor) { + _primaryColor = primaryColor; + _prefs.setInt('primaryColorLight', primaryColor.light.value); + _prefs.setInt('primaryColorDark', primaryColor.dark.value); + notifyListeners(); + } } ThemeData _lightTheme = ThemeData.light().copyWith( @@ -66,7 +80,6 @@ ThemeData _lightTheme = ThemeData.light().copyWith( labelMedium: TextStyle(color: Colors.black), labelSmall: TextStyle(color: Colors.black), ), - // scaffoldBackgroundColor: Colors.white, textTheme: GoogleFonts.poppinsTextTheme(), appBarTheme: const AppBarTheme( foregroundColor: Colors.black, @@ -127,3 +140,54 @@ ThemeData _darkTheme = ThemeData.dark().copyWith( inactiveTrackColor: Colors.white.withOpacity(0.4), ), ); + +class PrimaryColor { + Color light; + Color dark; + PrimaryColor({ + required this.light, + required this.dark, + }); + + PrimaryColor copyWith({ + Color? light, + Color? dark, + }) { + return PrimaryColor( + light: light ?? this.light, + dark: dark ?? this.dark, + ); + } + + Map toMap() { + return { + 'light': light.value, + 'dark': dark.value, + }; + } + + factory PrimaryColor.fromMap(Map map) { + return PrimaryColor( + light: Color(map['light'] as int), + dark: Color(map['dark'] as int), + ); + } + + String toJson() => json.encode(toMap()); + + factory PrimaryColor.fromJson(String source) => + PrimaryColor.fromMap(json.decode(source) as Map); + + @override + String toString() => 'PrimaryColor(light: $light, dark: $dark)'; + + @override + bool operator ==(covariant PrimaryColor other) { + if (identical(this, other)) return true; + + return other.light == light && other.dark == dark; + } + + @override + int get hashCode => light.hashCode ^ dark.hashCode; +} diff --git a/lib/screens/AboutScreen.dart b/lib/screens/AboutScreen.dart index 45faf2f..38e19af 100644 --- a/lib/screens/AboutScreen.dart +++ b/lib/screens/AboutScreen.dart @@ -5,6 +5,8 @@ import 'package:url_launcher/url_launcher.dart'; import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/providers/ThemeProvider.dart'; +import '../providers/LanguageProvider.dart'; + class AboutScreen extends StatelessWidget { const AboutScreen({super.key}); @@ -55,162 +57,167 @@ class AboutScreen extends StatelessWidget { ]; bool isDarkTheme = context.watch().themeMode == ThemeMode.dark; - return Scaffold( - appBar: AppBar( - leading: IconButton( - onPressed: () { - Navigator.pop(context); - }, - icon: Icon( - Icons.arrow_back, - color: isDarkTheme ? Colors.white : Colors.black, - )), - backgroundColor: Colors.transparent, - elevation: 0, - title: Text(S.of(context).About), - centerTitle: true, - ), - body: SafeArea( - child: SingleChildScrollView( - physics: const BouncingScrollPhysics(), - child: Padding( - padding: const EdgeInsets.all(16.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Center( - child: ClipRRect( - borderRadius: BorderRadius.circular(10), - child: Image.asset('assets/images/logo.png')), - ), - const SizedBox(height: 30), - Row( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "Vibe Music ", - style: Theme.of(context).primaryTextTheme.titleLarge, - ), - Text( - '0.5.1-beta.1', - style: Theme.of(context).primaryTextTheme.bodyLarge, - ) - ], - ), - const SizedBox(height: 50), - Text( - S.of(context).SOCIALS, - style: Theme.of(context) - .primaryTextTheme - .titleMedium - ?.copyWith( - color: isDarkTheme ? Colors.white : Colors.black, - fontWeight: FontWeight.bold), - ), - ...socials.map((item) { - return Padding( - padding: const EdgeInsets.only(top: 10), - child: ListTile( - onTap: () { - if (item['link'] != null) { - Uri url = Uri.parse(item['link']); - launchUrl(url, mode: LaunchMode.externalApplication); - } - }, - leading: Icon( - item['icon'], - color: isDarkTheme ? Colors.white : Colors.black, - ), - title: Text( - item['title'], - style: Theme.of(context) - .primaryTextTheme - .titleMedium - ?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), - ), - subtitle: item['subtitle'] == null - ? null - : Text( - item['subtitle'], - style: Theme.of(context) - .primaryTextTheme - .bodySmall - ?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), - ), - trailing: Icon( - Icons.open_in_browser_rounded, - color: isDarkTheme ? Colors.white : Colors.black, + return Directionality( + textDirection: context.watch().textDirection, + child: Scaffold( + appBar: AppBar( + leading: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: Icon( + Icons.arrow_back, + color: isDarkTheme ? Colors.white : Colors.black, + )), + backgroundColor: Colors.transparent, + elevation: 0, + title: Text(S.of(context).About), + centerTitle: true, + ), + body: SafeArea( + child: SingleChildScrollView( + physics: const BouncingScrollPhysics(), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Center( + child: ClipRRect( + borderRadius: BorderRadius.circular(10), + child: Image.asset('assets/images/logo.png')), + ), + const SizedBox(height: 30), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "Vibe Music ", + style: Theme.of(context).primaryTextTheme.titleLarge, ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20)), - tileColor: Theme.of(context).colorScheme.primary, - ), - ); - }).toList(), - const SizedBox(height: 30), - Text( - S.of(context).TROUBLESHOOTING, - style: Theme.of(context) - .primaryTextTheme - .titleMedium - ?.copyWith( + Text( + '0.5.1', + style: Theme.of(context).primaryTextTheme.bodyLarge, + ) + ], + ), + const SizedBox(height: 50), + Text( + S.of(context).SOCIALS, + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + color: isDarkTheme ? Colors.white : Colors.black, + fontWeight: FontWeight.bold), + ), + ...socials.map((item) { + return Padding( + padding: const EdgeInsets.only(top: 10), + child: ListTile( + onTap: () { + if (item['link'] != null) { + Uri url = Uri.parse(item['link']); + launchUrl(url, + mode: LaunchMode.externalApplication); + } + }, + leading: Icon( + item['icon'], color: isDarkTheme ? Colors.white : Colors.black, - fontWeight: FontWeight.bold), - ), - ...troubleshooting.map((item) { - return Padding( - padding: const EdgeInsets.only(top: 10), - child: ListTile( - onTap: () { - if (item['link'] != null) { - Uri url = Uri.parse(item['link']); - launchUrl(url, mode: LaunchMode.externalApplication); - } - }, - leading: Icon( - item['icon'], - color: isDarkTheme ? Colors.white : Colors.black, - ), - title: Text( - item['title'], - style: Theme.of(context) - .primaryTextTheme - .titleMedium - ?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), + ), + title: Text( + item['title'], + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + subtitle: item['subtitle'] == null + ? null + : Text( + item['subtitle'], + style: Theme.of(context) + .primaryTextTheme + .bodySmall + ?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + trailing: Icon( + Icons.open_in_browser_rounded, + color: isDarkTheme ? Colors.white : Colors.black, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + tileColor: Theme.of(context).colorScheme.primary, ), - subtitle: item['subtitle'] == null - ? null - : Text( - item['subtitle'], - style: Theme.of(context) - .primaryTextTheme - .bodySmall - ?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), - ), - trailing: Icon( - Icons.open_in_browser_rounded, - color: isDarkTheme ? Colors.white : Colors.black, + ); + }).toList(), + const SizedBox(height: 30), + Text( + S.of(context).TROUBLESHOOTING, + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + color: isDarkTheme ? Colors.white : Colors.black, + fontWeight: FontWeight.bold), + ), + ...troubleshooting.map((item) { + return Padding( + padding: const EdgeInsets.only(top: 10), + child: ListTile( + onTap: () { + if (item['link'] != null) { + Uri url = Uri.parse(item['link']); + launchUrl(url, + mode: LaunchMode.externalApplication); + } + }, + leading: Icon( + item['icon'], + color: isDarkTheme ? Colors.white : Colors.black, + ), + title: Text( + item['title'], + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + subtitle: item['subtitle'] == null + ? null + : Text( + item['subtitle'], + style: Theme.of(context) + .primaryTextTheme + .bodySmall + ?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + trailing: Icon( + Icons.open_in_browser_rounded, + color: isDarkTheme ? Colors.white : Colors.black, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + tileColor: Theme.of(context).colorScheme.primary, ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20)), - tileColor: Theme.of(context).colorScheme.primary, - ), - ); - }).toList(), - ], + ); + }).toList(), + ], + ), ), ), ), diff --git a/lib/screens/ArtistScreen.dart b/lib/screens/ArtistScreen.dart index 2229e61..5b081a0 100644 --- a/lib/screens/ArtistScreen.dart +++ b/lib/screens/ArtistScreen.dart @@ -1,16 +1,9 @@ -import 'dart:developer'; - -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/container.dart'; -import 'package:flutter/src/widgets/framework.dart'; import 'package:provider/provider.dart'; import 'package:vibe_music/data/home1.dart'; import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/providers/ThemeProvider.dart'; import 'package:vibe_music/widgets/TrackTile.dart'; - -import '../Models/Track.dart'; import '../providers/MusicPlayer.dart'; class ArtistScreen extends StatefulWidget { diff --git a/lib/screens/FavouriteScreen.dart b/lib/screens/FavouriteScreen.dart index ed4382f..6cc0fbf 100644 --- a/lib/screens/FavouriteScreen.dart +++ b/lib/screens/FavouriteScreen.dart @@ -1,12 +1,7 @@ -import 'dart:collection'; import 'dart:convert'; -import 'dart:developer'; import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/container.dart'; -import 'package:flutter/src/widgets/framework.dart'; import 'package:hive_flutter/hive_flutter.dart'; -import 'package:vibe_music/Models/Track.dart'; import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/widgets/TrackTile.dart'; @@ -30,7 +25,7 @@ class FavouriteScreen extends StatelessWidget { if (favourites.isEmpty) { return Center( child: Text( - "Nothing Here", + S.of(context).Nothing_Here, style: Theme.of(context).primaryTextTheme.bodyLarge, ), ); diff --git a/lib/screens/HomeScreen.dart b/lib/screens/HomeScreen.dart index be56ecc..771bd7a 100644 --- a/lib/screens/HomeScreen.dart +++ b/lib/screens/HomeScreen.dart @@ -1,7 +1,3 @@ -import 'dart:convert'; -import 'dart:developer'; -import 'dart:ffi'; - import 'package:cached_network_image/cached_network_image.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:expandable_page_view/expandable_page_view.dart'; @@ -359,8 +355,12 @@ class _HomeScreenState extends State Navigator.pushNamed( context, '/playlist', arguments: { - 'playlistId': - playlist['playlistId'] + 'playlistId': playlist[ + 'playlistId'] ?? + playlist['browseId'], + 'isAlbum': playlist[ + 'browseId'] != + null, }); }, child: CachedNetworkImage( diff --git a/lib/screens/MainScreen.dart b/lib/screens/MainScreen.dart index f751768..e38aec9 100644 --- a/lib/screens/MainScreen.dart +++ b/lib/screens/MainScreen.dart @@ -2,7 +2,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:miniplayer/miniplayer.dart'; import 'package:provider/provider.dart'; -import 'package:vibe_music/data/home1.dart'; import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/providers/LanguageProvider.dart'; import 'package:vibe_music/providers/MusicPlayer.dart'; @@ -201,6 +200,7 @@ class HomeTab extends StatelessWidget { return MaterialPageRoute( builder: (_) => PlayListScreen( playlistId: args['playlistId'], + isAlbum: args['isAlbum'], )); case '/home/artist': Map args = diff --git a/lib/screens/PlayListScreen.dart b/lib/screens/PlayListScreen.dart index 63ee59a..f9708bd 100644 --- a/lib/screens/PlayListScreen.dart +++ b/lib/screens/PlayListScreen.dart @@ -1,16 +1,16 @@ import 'package:cached_network_image/cached_network_image.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:vibe_music/Models/Track.dart'; import 'package:vibe_music/data/home1.dart'; import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/providers/MusicPlayer.dart'; import 'package:vibe_music/widgets/TrackTile.dart'; class PlayListScreen extends StatefulWidget { - const PlayListScreen({required this.playlistId, super.key}); + const PlayListScreen( + {required this.playlistId, this.isAlbum = false, super.key}); final String playlistId; + final bool isAlbum; @override State createState() => _PlayListScreenState(); @@ -22,12 +22,21 @@ class _PlayListScreenState extends State { @override void initState() { super.initState(); - HomeApi.getPlaylist(widget.playlistId).then((Map value) { - setState(() { - playlist = value; - loading = false; + if (widget.isAlbum) { + HomeApi.getAlbum(widget.playlistId).then((Map value) { + setState(() { + playlist = value; + loading = false; + }); }); - }); + } else { + HomeApi.getPlaylist(widget.playlistId).then((Map value) { + setState(() { + playlist = value; + loading = false; + }); + }); + } } @override @@ -85,7 +94,9 @@ class _PlayListScreenState extends State { .bodyMedium, ), Text( - playlist?['author']['name'], + playlist?['author']?['name'] ?? + playlist?['artists']?.first['name'] ?? + "", style: Theme.of(context) .primaryTextTheme .bodyMedium, @@ -134,7 +145,16 @@ class _PlayListScreenState extends State { setState(() {}); return const SizedBox.shrink(); } - + if (widget.isAlbum) { + track['thumbnails'] = [ + { + 'url': + 'https://vibeapi-sheikh-haziq.vercel.app/thumb/sd?id=${track['videoId']}', + 'width': 60, + 'height': 60, + } + ]; + } return TrackTile( track: track, ); diff --git a/lib/screens/PlayerScreen.dart b/lib/screens/PlayerScreen.dart index 03cddc4..e61d7e1 100644 --- a/lib/screens/PlayerScreen.dart +++ b/lib/screens/PlayerScreen.dart @@ -1,4 +1,3 @@ -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hive_flutter/hive_flutter.dart'; @@ -10,7 +9,6 @@ import 'package:vibe_music/generated/l10n.dart'; import 'package:vibe_music/providers/LanguageProvider.dart'; import 'package:vibe_music/providers/MusicPlayer.dart'; import 'package:vibe_music/providers/ThemeProvider.dart'; -import 'package:vibe_music/utils/colors.dart'; import 'package:vibe_music/widgets/MusicSlider.dart'; class PlayerScreen extends StatefulWidget { @@ -35,7 +33,6 @@ class _PlayerScreenState extends State { @override Widget build(BuildContext context) { - List songs = context.watch().songs ?? []; Track? song = context.watch().song; AudioPlayer player = context.watch().player; Size size = MediaQuery.of(context).size; @@ -117,7 +114,7 @@ class _PlayerScreenState extends State { builder: (context, Box box, child) { Map? favourite = box.get(song.videoId); return MaterialButton( - padding: EdgeInsets.all(16), + padding: const EdgeInsets.all(16), elevation: 0, color: favourite != null ? Theme.of(context) @@ -398,9 +395,8 @@ class QueueScreen extends StatelessWidget { ), child: ListTile( onTap: () { - if (player.currentIndex != index) { - player.play(); - } + player.seek(Duration.zero, index: index); + player.play(); }, key: Key("$index"), leading: ClipRRect( diff --git a/lib/screens/SearchScreen.dart b/lib/screens/SearchScreen.dart index e6df324..6a51b1c 100644 --- a/lib/screens/SearchScreen.dart +++ b/lib/screens/SearchScreen.dart @@ -1,5 +1,3 @@ -import 'dart:developer'; - import 'package:flutter/material.dart'; import 'package:vibe_music/data/home1.dart'; import 'package:vibe_music/generated/l10n.dart'; @@ -93,8 +91,8 @@ class _SearchScreenState extends State ? Theme.of(context).colorScheme.primary : Colors.transparent, child: Text(S.of(context).Songs, - style: - TextStyle(overflow: TextOverflow.ellipsis)), + style: const TextStyle( + overflow: TextOverflow.ellipsis)), onPressed: () { setState(() { _pageIndex = 0; @@ -119,7 +117,8 @@ class _SearchScreenState extends State : Colors.transparent, child: Text( S.of(context).Artists, - style: TextStyle(overflow: TextOverflow.ellipsis), + style: const TextStyle( + overflow: TextOverflow.ellipsis), ), onPressed: () { _pageIndex = 1; @@ -142,8 +141,8 @@ class _SearchScreenState extends State ? Theme.of(context).colorScheme.primary : Colors.transparent, child: Text(S.of(context).Playlists, - style: - TextStyle(overflow: TextOverflow.ellipsis)), + style: const TextStyle( + overflow: TextOverflow.ellipsis)), onPressed: () { _pageIndex = 2; pageController.animateToPage(2, @@ -177,6 +176,5 @@ class _SearchScreenState extends State } @override - // TODO: implement wantKeepAlive bool get wantKeepAlive => true; } diff --git a/lib/screens/SearchScreens/ArtistsSearch.dart b/lib/screens/SearchScreens/ArtistsSearch.dart index 2be0183..86e1363 100644 --- a/lib/screens/SearchScreens/ArtistsSearch.dart +++ b/lib/screens/SearchScreens/ArtistsSearch.dart @@ -1,6 +1,3 @@ -import 'dart:developer'; - -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; class ArtistsScreen extends StatefulWidget { diff --git a/lib/screens/SearchScreens/SongsSearch.dart b/lib/screens/SearchScreens/SongsSearch.dart index b21192b..6d9f4e5 100644 --- a/lib/screens/SearchScreens/SongsSearch.dart +++ b/lib/screens/SearchScreens/SongsSearch.dart @@ -1,9 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:vibe_music/Models/Track.dart'; -import 'package:vibe_music/generated/l10n.dart'; -import 'package:vibe_music/providers/MusicPlayer.dart'; import 'package:vibe_music/widgets/TrackTile.dart'; class SongsSearch extends StatefulWidget { diff --git a/lib/screens/SettingsScreen.dart b/lib/screens/SettingsScreen.dart index 6120a8e..6c210c7 100644 --- a/lib/screens/SettingsScreen.dart +++ b/lib/screens/SettingsScreen.dart @@ -1,6 +1,3 @@ -import 'dart:convert'; -import 'dart:developer'; - import 'package:country_picker/country_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -10,6 +7,7 @@ import 'package:vibe_music/providers/AudioQualityprovider.dart'; import 'package:vibe_music/providers/LanguageProvider.dart'; import 'package:vibe_music/providers/ThemeProvider.dart'; import 'package:vibe_music/screens/AboutScreen.dart'; +import 'package:vibe_music/screens/ThemeScreen.dart'; class SettingsScreen extends StatelessWidget { const SettingsScreen({super.key}); @@ -278,7 +276,7 @@ class SettingsScreen extends StatelessWidget { ); }, leading: Icon( - Icons.directions, + Icons.flag_rounded, color: darkTheme ? Colors.white : Colors.black, ), shape: RoundedRectangleBorder( @@ -391,70 +389,23 @@ class SettingsScreen extends StatelessWidget { padding: const EdgeInsets.only(bottom: 8), child: ListTile( onTap: () { - String value = - context.read().themeMode == ThemeMode.dark - ? 'light' - : 'dark'; - context.read().setTheme(value); + Navigator.push( + context, MaterialPageRoute(builder: (_) => ThemeScreen())); }, - leading: Icon( - Icons.dark_mode, - color: darkTheme ? Colors.white : Colors.black, - ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20)), - tileColor: Theme.of(context).colorScheme.primary, title: Text( - S.of(context).Dark_Theme, + S.of(context).Theme, style: Theme.of(context).primaryTextTheme.titleMedium?.copyWith( overflow: TextOverflow.ellipsis, fontWeight: FontWeight.bold, ), ), - trailing: CupertinoSwitch( - value: context.watch().themeMode == - ThemeMode.dark, - onChanged: (value) { - context - .read() - .setTheme(value == true ? 'dark' : 'light'); - }), - ), - ), - // Dynamic theme - Padding( - padding: const EdgeInsets.only(bottom: 8), - child: ListTile( - onTap: () { - bool value = context.read().dynamicThemeMode; - context.read().setDynamicThemeMode(!value); - }, leading: Icon( - Icons.style_rounded, + Icons.color_lens_rounded, color: darkTheme ? Colors.white : Colors.black, ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20)), tileColor: Theme.of(context).colorScheme.primary, - title: Text( - S.of(context).Dynamic_Theme, - style: Theme.of(context).primaryTextTheme.titleMedium?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), - ), - subtitle: Text( - S.of(context).Experimental, - style: Theme.of(context).primaryTextTheme.bodySmall?.copyWith( - overflow: TextOverflow.ellipsis, - fontWeight: FontWeight.bold, - ), - ), - trailing: CupertinoSwitch( - value: context.watch().dynamicThemeMode, - onChanged: (value) { - context.read().setDynamicThemeMode(value); - }), ), ), Padding( diff --git a/lib/screens/ThemeScreen.dart b/lib/screens/ThemeScreen.dart new file mode 100644 index 0000000..cecd5df --- /dev/null +++ b/lib/screens/ThemeScreen.dart @@ -0,0 +1,213 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../generated/l10n.dart'; +import '../providers/LanguageProvider.dart'; +import '../providers/ThemeProvider.dart'; + +class ThemeScreen extends StatelessWidget { + ThemeScreen({super.key}); + final List colorPallete = [ + ...Colors.primaries + .map((e) => PrimaryColor(light: e.shade100, dark: e.shade900)), + PrimaryColor(light: Colors.white, dark: Colors.black) + ]; + + @override + Widget build(BuildContext context) { + bool darkTheme = context.watch().themeMode == ThemeMode.dark; + return Directionality( + textDirection: context.watch().textDirection, + child: Scaffold( + appBar: AppBar( + leading: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: Icon( + Icons.arrow_back, + color: darkTheme ? Colors.white : Colors.black, + )), + backgroundColor: Colors.transparent, + elevation: 0, + title: Text(S.of(context).Theme), + centerTitle: true, + ), + body: ListView( + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.all(16.0), + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: ListTile( + onTap: () { + showDialog( + context: context, + builder: (context) { + return Directionality( + textDirection: TextDirection.ltr, + child: AlertDialog( + contentPadding: const EdgeInsets.symmetric( + vertical: 0, horizontal: 20), + backgroundColor: + Theme.of(context).scaffoldBackgroundColor, + content: SizedBox( + height: 340, + child: GridView( + padding: const EdgeInsets.symmetric( + vertical: 20, horizontal: 0), + gridDelegate: + const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 4, + mainAxisSpacing: 4, + crossAxisSpacing: 4, + ), + children: + colorPallete.map((PrimaryColor color) { + return InkWell( + onTap: () { + context + .read() + .setPrimaryColor(color); + Navigator.pop(context); + }, + child: Row( + children: [ + Container( + height: 50, + width: 25, + decoration: BoxDecoration( + color: color.light, + borderRadius: + const BorderRadius.only( + topLeft: + Radius.circular(25), + bottomLeft: + Radius.circular(25))), + ), + Container( + height: 50, + width: 25, + decoration: BoxDecoration( + color: color.dark, + borderRadius: + const BorderRadius.only( + topRight: + Radius.circular(25), + bottomRight: + Radius.circular(25))), + ), + ], + ), + ); + }).toList(), + ), + ), + ), + ); + }, + ); + }, + leading: Icon( + Icons.color_lens_rounded, + color: darkTheme ? Colors.white : Colors.black, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + tileColor: Theme.of(context).colorScheme.primary, + title: Text( + S.of(context).Theme, + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + trailing: CircleAvatar( + backgroundColor: darkTheme ? Colors.white : Colors.black, + child: Container( + margin: const EdgeInsets.all(8), + child: CircleAvatar( + backgroundColor: darkTheme + ? context.watch().primaryColor.dark + : context + .watch() + .primaryColor + .light, + )), + )), + ), + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: ListTile( + onTap: () { + String value = + context.read().themeMode == ThemeMode.dark + ? 'light' + : 'dark'; + context.read().setTheme(value); + }, + leading: Icon( + Icons.dark_mode, + color: darkTheme ? Colors.white : Colors.black, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + tileColor: Theme.of(context).colorScheme.primary, + title: Text( + S.of(context).Dark_Theme, + style: + Theme.of(context).primaryTextTheme.titleMedium?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + trailing: CupertinoSwitch( + value: context.watch().themeMode == + ThemeMode.dark, + onChanged: (value) { + context + .read() + .setTheme(value == true ? 'dark' : 'light'); + }), + ), + ), + // Dynamic theme + Padding( + padding: const EdgeInsets.only(bottom: 8), + child: ListTile( + onTap: () { + bool value = context.read().dynamicThemeMode; + context.read().setDynamicThemeMode(!value); + }, + leading: Icon( + Icons.style_rounded, + color: darkTheme ? Colors.white : Colors.black, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20)), + tileColor: Theme.of(context).colorScheme.primary, + title: Text( + S.of(context).Dynamic_Theme, + style: + Theme.of(context).primaryTextTheme.titleMedium?.copyWith( + overflow: TextOverflow.ellipsis, + fontWeight: FontWeight.bold, + ), + ), + trailing: CupertinoSwitch( + value: context.watch().dynamicThemeMode, + onChanged: (value) { + context.read().setDynamicThemeMode(value); + }), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/PanelHeader.dart b/lib/widgets/PanelHeader.dart index 7df27cd..c05b0cb 100644 --- a/lib/widgets/PanelHeader.dart +++ b/lib/widgets/PanelHeader.dart @@ -73,98 +73,97 @@ class PanelHeader extends StatelessWidget { ), ), ), - if (song != null) - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16, vertical: 7), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - ClipRRect( - borderRadius: BorderRadius.circular(2), - child: CachedNetworkImage( - imageUrl: - 'https://vibeapi-sheikh-haziq.vercel.app/thumb/hd?id=${song.videoId}', - width: 54, - height: 54, - fit: BoxFit.fill, - errorWidget: (context, error, stackTrace) { - return Image.network( - song.thumbnails.last.url, - width: double.infinity, - fit: BoxFit.fill, - ); - }, - ), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 16, vertical: 7), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(2), + child: CachedNetworkImage( + imageUrl: + 'https://vibeapi-sheikh-haziq.vercel.app/thumb/sd?id=${song.videoId}', + width: 54, + height: 54, + fit: BoxFit.fill, + errorWidget: (context, error, stackTrace) { + return Image.network( + song.thumbnails.last.url, + width: double.infinity, + fit: BoxFit.fill, + ); + }, ), - const SizedBox(width: 8), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - song.title, - style: Theme.of(context) - .primaryTextTheme - .titleMedium - ?.copyWith( - fontSize: 14, - fontWeight: FontWeight.bold, - overflow: TextOverflow.ellipsis, - ), - ), - Text( - song.artists.first.name, - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - color: Color.fromARGB(255, 93, 92, 92), - overflow: TextOverflow.ellipsis, - ), + ), + const SizedBox(width: 8), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + song.title, + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith( + fontSize: 14, + fontWeight: FontWeight.bold, + overflow: TextOverflow.ellipsis, + ), + ), + Text( + song.artists.first.name, + style: const TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 93, 92, 92), + overflow: TextOverflow.ellipsis, ), - ], - ), + ), + ], ), - IconButton( - onPressed: () { - context.read().togglePlay(); - }, - icon: StreamBuilder( - stream: player.playerStateStream, - builder: (context, snapshot) { - PlayerState? state = snapshot.data; - if (state == null) { + ), + IconButton( + onPressed: () { + context.read().togglePlay(); + }, + icon: StreamBuilder( + stream: player.playerStateStream, + builder: (context, snapshot) { + PlayerState? state = snapshot.data; + if (state == null) { + return const CircularProgressIndicator(); + } + switch (state.processingState) { + case ProcessingState.buffering: + case ProcessingState.loading: + case ProcessingState.idle: return const CircularProgressIndicator(); - } - switch (state.processingState) { - case ProcessingState.buffering: - case ProcessingState.loading: - case ProcessingState.idle: - return const CircularProgressIndicator(); - case ProcessingState.completed: - return const Icon(Icons.play_arrow); - // case ProcessingState.idle: - // return const Icon(Icons.play_arrow); - case ProcessingState.ready: - return Icon( - player.playing - ? Icons.pause_rounded - : Icons.play_arrow_rounded, - color: context - .watch() - .themeMode == - ThemeMode.dark - ? Colors.white - : Colors.black, - ); - default: - return const CircularProgressIndicator(); - } - }), - ), - ], - ), + case ProcessingState.completed: + return const Icon(Icons.play_arrow); + // case ProcessingState.idle: + // return const Icon(Icons.play_arrow); + case ProcessingState.ready: + return Icon( + player.playing + ? Icons.pause_rounded + : Icons.play_arrow_rounded, + color: context + .watch() + .themeMode == + ThemeMode.dark + ? Colors.white + : Colors.black, + ); + default: + return const CircularProgressIndicator(); + } + }), + ), + ], ), + ), ], ), ), diff --git a/lib/widgets/TrackTile.dart b/lib/widgets/TrackTile.dart index 5313e09..3932ef0 100644 --- a/lib/widgets/TrackTile.dart +++ b/lib/widgets/TrackTile.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:provider/provider.dart'; +import 'package:share_plus/share_plus.dart'; import 'package:vibe_music/Models/Track.dart'; import 'package:vibe_music/providers/ThemeProvider.dart'; @@ -19,14 +20,52 @@ class TrackTile extends StatelessWidget { @override Widget build(BuildContext context) { Track? song = Track.fromMap(track); + bool isDarkTheme = context.watch().themeMode == ThemeMode.dark; - showOptions(song) { + showOptions(Track song) { showCupertinoModalPopup( context: context, builder: (context) { return CupertinoActionSheet( actions: [ + Material( + child: ListTile( + leading: ClipRRect( + borderRadius: BorderRadius.circular(5), + child: Image.network( + 'https://vibeapi-sheikh-haziq.vercel.app/thumb/sd?id=${song.videoId}', + width: 45, + height: 45, + fit: BoxFit.cover, + errorBuilder: ((context, error, stackTrace) { + return Image.asset("assets/images/song.png"); + }), + ), + ), + title: Text(song.title, + style: Theme.of(context) + .primaryTextTheme + .titleMedium + ?.copyWith(overflow: TextOverflow.ellipsis)), + subtitle: Text( + song.artists.map((e) => e.name).toList().join(', '), + style: const TextStyle( + color: Color.fromARGB(255, 93, 92, 92), + overflow: TextOverflow.ellipsis, + ), + ), + trailing: IconButton( + onPressed: () { + Share.share( + "https://music.youtube.com/watch?v=${song.videoId}"); + }, + icon: Icon( + Icons.share, + color: isDarkTheme ? Colors.white : Colors.black, + )), + ), + ), Material( child: ListTile( onTap: () { @@ -89,7 +128,7 @@ class TrackTile extends StatelessWidget { leading: ClipRRect( borderRadius: BorderRadius.circular(5), child: Image.network( - 'https://vibeapi-sheikh-haziq.vercel.app/thumb/hd?id=${song.videoId}', + 'https://vibeapi-sheikh-haziq.vercel.app/thumb/sd?id=${song.videoId}', width: 45, height: 45, fit: BoxFit.cover, @@ -113,14 +152,14 @@ class TrackTile extends StatelessWidget { onLongPress: () { showOptions(song); }, - trailing: IconButton( - onPressed: () { - showOptions(song); - }, - icon: Icon( - Icons.more_vert, - color: isDarkTheme ? Colors.white : Colors.black, - )), + // trailing: IconButton( + // onPressed: () { + // showOptions(song); + // }, + // icon: Icon( + // Icons.more_vert, + // color: isDarkTheme ? Colors.white : Colors.black, + // )), ); } } diff --git a/pubspec.lock b/pubspec.lock index 2602e7c..8397c2a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: audio_service url: "https://pub.dartlang.org" source: hosted - version: "0.18.7" + version: "0.18.9" audio_service_platform_interface: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: audio_session url: "https://pub.dartlang.org" source: hosted - version: "0.1.11" + version: "0.1.13" boolean_selector: dependency: transitive description: @@ -99,6 +99,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.19" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3+2" crypto: dependency: transitive description: @@ -329,6 +336,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" miniplayer: dependency: "direct main" description: @@ -462,6 +476,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.27.7" + share_plus: + dependency: "direct main" + description: + name: share_plus + url: "https://pub.dartlang.org" + source: hosted + version: "6.3.0" + share_plus_platform_interface: + dependency: transitive + description: + name: share_plus_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" shared_preferences: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 1a042a7..38ecf7d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: vibe_music description: A new Flutter project. publish_to: 'none' -version: 0.5.1-beta.2+5 +version: 0.5.1+5 environment: sdk: '>=2.18.5 <3.0.0' @@ -30,6 +30,7 @@ dependencies: country_picker: ^2.0.19 hive: ^2.2.3 hive_flutter: ^1.1.0 + share_plus: ^6.3.0 dev_dependencies: flutter_test: