From cce43ac1d590191375f9f9f6dc4253a2de8aa49e Mon Sep 17 00:00:00 2001 From: Sheikh haziq Date: Mon, 1 Jul 2024 09:53:56 +0530 Subject: [PATCH] enhanced image quality --- README.md | 8 +- .../browse_screen.dart | 6 +- lib/screens/home_screen/chip_screen.dart | 1 + lib/screens/home_screen/home_screen.dart | 2 + .../search_screen/search_screen.dart | 2 +- lib/screens/home_screen/section_item.dart | 68 ++++++++----- .../library_screen/library_screen.dart | 2 +- lib/screens/main_screen/bottom_player.dart | 14 ++- lib/screens/main_screen/main_screen.dart | 1 + lib/screens/main_screen/player_screen.dart | 99 ++++++++++++------- lib/screens/main_screen/queue_list.dart | 21 +++- .../settings_screen/settings_screen.dart | 6 +- lib/services/bottom_message.dart | 5 +- lib/services/media_player.dart | 1 + lib/utils/bottom_modals.dart | 57 ++++++----- lib/utils/enhanced_image.dart | 44 +++++++++ lib/utils/router.dart | 3 +- 17 files changed, 235 insertions(+), 105 deletions(-) rename lib/screens/{playlist_screen => browse_screen}/browse_screen.dart (97%) create mode 100644 lib/utils/enhanced_image.dart diff --git a/README.md b/README.md index d131d79..2094da1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
-

Gyawun (Formerly Vibe Music)

-

A Flutter application for streaming music from Jio Saavn and YouTube Music

+

Gyawun

+

A Flutter application for streaming music from YouTube Music

Latest release Commits since latest release @@ -24,8 +24,8 @@ - - +

+

diff --git a/lib/screens/playlist_screen/browse_screen.dart b/lib/screens/browse_screen/browse_screen.dart similarity index 97% rename from lib/screens/playlist_screen/browse_screen.dart rename to lib/screens/browse_screen/browse_screen.dart index c8769d6..07b5299 100644 --- a/lib/screens/playlist_screen/browse_screen.dart +++ b/lib/screens/browse_screen/browse_screen.dart @@ -112,7 +112,9 @@ class _BrowseScreenState extends State { sections.length == 1 || sec.$1 == 0); }), - const SizedBox(height: 8), + if (!nextLoading && continuation != null) + const SizedBox(height: 64), + if (nextLoading) const CircularProgressIndicator(), if (nextLoading) const CircularProgressIndicator(), ], ), @@ -214,6 +216,8 @@ class _HeaderWidgetState extends State { if (header['videoId'] != null || header['playlistId'] != null) MaterialButton( onPressed: () async { + BottomMessage.showText( + context, 'Songs will start playing soon.'); await GetIt.I() .startPlaylistSongs(Map.from(header)); }, diff --git a/lib/screens/home_screen/chip_screen.dart b/lib/screens/home_screen/chip_screen.dart index afb3050..1e940dc 100644 --- a/lib/screens/home_screen/chip_screen.dart +++ b/lib/screens/home_screen/chip_screen.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; +import 'package:gyawun_beta/utils/pprint.dart'; import '../../ytmusic/ytmusic.dart'; import 'section_item.dart'; diff --git a/lib/screens/home_screen/home_screen.dart b/lib/screens/home_screen/home_screen.dart index a0f44d5..479d3b3 100644 --- a/lib/screens/home_screen/home_screen.dart +++ b/lib/screens/home_screen/home_screen.dart @@ -178,6 +178,8 @@ class _HomeScreenState extends State { ...sections.map((section) { return SectionItem(section: section); }), + if (!nextLoading && continuation != null) + const SizedBox(height: 50), if (nextLoading) const CircularProgressIndicator(), ], ) diff --git a/lib/screens/home_screen/search_screen/search_screen.dart b/lib/screens/home_screen/search_screen/search_screen.dart index a82576a..0e5e963 100644 --- a/lib/screens/home_screen/search_screen/search_screen.dart +++ b/lib/screens/home_screen/search_screen/search_screen.dart @@ -9,7 +9,7 @@ import '../../../services/media_player.dart'; import '../../../themes/colors.dart'; import '../../../utils/bottom_modals.dart'; import '../../../ytmusic/ytmusic.dart'; -import '../../playlist_screen/browse_screen.dart'; +import '../../browse_screen/browse_screen.dart'; class SearchScreen extends StatefulWidget { const SearchScreen({this.endpoint, this.isMore = false, super.key}); diff --git a/lib/screens/home_screen/section_item.dart b/lib/screens/home_screen/section_item.dart index 6baf26c..f9a9e8b 100644 --- a/lib/screens/home_screen/section_item.dart +++ b/lib/screens/home_screen/section_item.dart @@ -6,12 +6,14 @@ import 'package:expandable_text/expandable_text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; +import 'package:gyawun_beta/services/bottom_message.dart'; +import 'package:gyawun_beta/utils/enhanced_image.dart'; import '../../utils/extensions.dart'; import '../../services/media_player.dart'; import '../../themes/colors.dart'; import '../../utils/bottom_modals.dart'; -import '../playlist_screen/browse_screen.dart'; +import '../browse_screen/browse_screen.dart'; class SectionItem extends StatelessWidget { const SectionItem({required this.section, this.isMore = false, super.key}); @@ -37,26 +39,45 @@ class SectionItem extends StatelessWidget { ) : null, trailing: section['trailing'] != null - ? MaterialButton( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20)), - onPressed: () async { - if (section['trailing']['playable'] == false) { - // GetIt.I().browseMore(body: section['trailing']['endpoint']); - Navigator.push( - context, - CupertinoPageRoute( - builder: (context) => BrowseScreen( - endpoint: section['trailing']['endpoint'], - isMore: true, - ), - )); - } else { - await GetIt.I().startPlaylistSongs( - section['trailing']['endpoint']); - } - }, - child: Text(section['trailing']['text']), + ? Row( + mainAxisSize: MainAxisSize.min, + children: [ + InkWell( + borderRadius: BorderRadius.circular(20), + onTap: () async { + if (section['trailing']['playable'] == false) { + Navigator.push( + context, + CupertinoPageRoute( + builder: (context) => BrowseScreen( + endpoint: section['trailing'] + ['endpoint'], + isMore: true, + ), + )); + } else { + BottomMessage.showText(context, + 'Songs will start playing soon.'); + await GetIt.I() + .startPlaylistSongs( + section['trailing']['endpoint']); + } + }, + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: Border.all( + color: context.subtitleColor, + ), + ), + child: Text(section['trailing']['text']), + ), + ), + ], ) : null, ), @@ -302,7 +323,10 @@ class _ItemListState extends State { ClipRRect( borderRadius: BorderRadius.circular(8), child: CachedNetworkImage( - imageUrl: items[index]['thumbnails'].first['url'], + imageUrl: getEnhancedImage( + items[index]['thumbnails'].first['url'], + width: width), + filterQuality: FilterQuality.high, height: height, width: width, fit: BoxFit.cover, diff --git a/lib/screens/library_screen/library_screen.dart b/lib/screens/library_screen/library_screen.dart index e6dbb42..1794a79 100644 --- a/lib/screens/library_screen/library_screen.dart +++ b/lib/screens/library_screen/library_screen.dart @@ -13,7 +13,7 @@ import '../../generated/l10n.dart'; import '../../services/library.dart'; import '../../themes/colors.dart'; import '../../utils/bottom_modals.dart'; -import '../playlist_screen/browse_screen.dart'; +import '../browse_screen/browse_screen.dart'; import 'favourite_details_screen.dart'; import 'history_screen.dart'; import 'playlist_details_screen.dart'; diff --git a/lib/screens/main_screen/bottom_player.dart b/lib/screens/main_screen/bottom_player.dart index bcfd65d..74bbc1d 100644 --- a/lib/screens/main_screen/bottom_player.dart +++ b/lib/screens/main_screen/bottom_player.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:gyawun_beta/utils/enhanced_image.dart'; import 'package:just_audio_background/just_audio_background.dart'; import 'package:provider/provider.dart'; @@ -60,12 +61,19 @@ class BottomPlayer extends StatelessWidget { fit: BoxFit.fill, ) : CachedNetworkImage( - imageUrl: currentSong - .extras!['thumbnails'].first['url'] - .replaceAll('w60-h60', 'w300-h300'), + imageUrl: getEnhancedImage(currentSong + .extras!['thumbnails'].first['url']), height: 50, width: 50, fit: BoxFit.fill, + errorWidget: (context, url, error) { + return CachedNetworkImage( + imageUrl: getEnhancedImage( + currentSong.extras!['thumbnails'] + .first['url'], + quality: 'medium'), + ); + }, ), ), const SizedBox(width: 8), diff --git a/lib/screens/main_screen/main_screen.dart b/lib/screens/main_screen/main_screen.dart index 93b0cdd..185b7d9 100644 --- a/lib/screens/main_screen/main_screen.dart +++ b/lib/screens/main_screen/main_screen.dart @@ -3,6 +3,7 @@ import 'package:device_info_plus/device_info_plus.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:gyawun_beta/utils/pprint.dart'; import 'package:salomon_bottom_bar/salomon_bottom_bar.dart'; import '../../generated/l10n.dart'; diff --git a/lib/screens/main_screen/player_screen.dart b/lib/screens/main_screen/player_screen.dart index fae0ac6..014b16a 100644 --- a/lib/screens/main_screen/player_screen.dart +++ b/lib/screens/main_screen/player_screen.dart @@ -8,6 +8,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get_it/get_it.dart'; +import 'package:gyawun_beta/utils/enhanced_image.dart'; +import 'package:gyawun_beta/utils/pprint.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:just_audio/just_audio.dart'; import 'package:just_audio_background/just_audio_background.dart'; @@ -49,7 +51,16 @@ class _PlayerScreenState extends State { if (image == null) return Theme.of(context).scaffoldBackgroundColor; PaletteGenerator paletteGenerator = await PaletteGenerator.fromImageProvider( - CachedNetworkImageProvider(image)); + CachedNetworkImageProvider( + image, + errorListener: (p0) { + setState(() { + image = getEnhancedImage(image!, quality: 'medium'); + }); + pprint(p0); + }, + ), + ); if (mounted) { return paletteGenerator.dominantColor?.color ?? paletteGenerator.lightVibrantColor?.color ?? @@ -88,11 +99,11 @@ class _PlayerScreenState extends State { if (currentSong?.extras?['thumbnails'] != null && currentSong?.extras?['thumbnails'].isNotEmpty && image != - currentSong?.extras?['thumbnails']?.first['url'] - .replaceAll('w60-h60', 'w300-h300')) { + getEnhancedImage( + currentSong?.extras?['thumbnails']?.first['url'])) { setState(() { - image = currentSong?.extras?['thumbnails']?.first['url'] - .replaceAll('w60-h60', 'w300-h300'); + image = + getEnhancedImage(currentSong?.extras?['thumbnails']?.first['url']); }); } // ignore: deprecated_member_use @@ -316,35 +327,51 @@ class Artwork extends StatelessWidget { Icons.music_note, size: width * 0.5, ) - : Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(30), - spreadRadius: 10, - blurRadius: 10, - offset: const Offset(0, 3), - ), - ], - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(8), - child: song?.extras?['offline'] == true && - !song!.artUri.toString().startsWith('https') - ? Image.file( - File.fromUri(song!.artUri!), - ) - : CachedNetworkImage( - imageUrl: song!.extras!['thumbnails'].first['url'] - .replaceAll('w60-h60', 'w300-h300'), + : SafeArea( + child: LayoutBuilder(builder: (context, constraints) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(30), + spreadRadius: 10, + blurRadius: 10, + offset: const Offset(0, 3), ), - ), - ), - ], + ], + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(8), + child: song?.extras?['offline'] == true && + !song!.artUri.toString().startsWith('https') + ? Image.file( + File.fromUri(song!.artUri!), + ) + : CachedNetworkImage( + width: min(constraints.maxHeight, + constraints.maxWidth), + filterQuality: FilterQuality.high, + imageUrl: getEnhancedImage( + song!.extras!['thumbnails'].first['url']), + errorWidget: (context, url, error) { + return CachedNetworkImage( + imageUrl: getEnhancedImage( + song! + .extras!['thumbnails'].first['url'], + quality: 'medium', + ), + ); + }, + ), + ), + ), + ], + ); + }), ), ), ); @@ -378,8 +405,9 @@ class NameAndControls extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ if (isRow) - AppBar( - actions: [ + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ IconButton( onPressed: () { currentState?.openEndDrawer(); @@ -388,7 +416,6 @@ class NameAndControls extends StatelessWidget { Icons.queue_music_outlined, )) ], - automaticallyImplyLeading: false, ), Column( mainAxisAlignment: MainAxisAlignment.spaceAround, diff --git a/lib/screens/main_screen/queue_list.dart b/lib/screens/main_screen/queue_list.dart index bbb4531..d6e4a08 100644 --- a/lib/screens/main_screen/queue_list.dart +++ b/lib/screens/main_screen/queue_list.dart @@ -4,6 +4,7 @@ import 'dart:ui'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; +import 'package:gyawun_beta/utils/enhanced_image.dart'; import 'package:just_audio_background/just_audio_background.dart'; import 'package:provider/provider.dart'; @@ -70,14 +71,24 @@ class QueueList extends StatelessWidget { }, ) : CachedNetworkImage( - imageUrl: song + imageUrl: getEnhancedImage(song .extras!['thumbnails'] - .first['url'] - .replaceAll( - 'w60-h60', 'w300-h300'), + .first['url']), width: 50, height: 50, - fit: BoxFit.fill), + fit: BoxFit.fill, + errorWidget: + (context, url, error) { + return CachedNetworkImage( + imageUrl: getEnhancedImage( + song + .extras![ + 'thumbnails'] + .first['url'], + quality: 'medium'), + ); + }, + ), if (index == currentIndex) Container( height: 50, diff --git a/lib/screens/settings_screen/settings_screen.dart b/lib/screens/settings_screen/settings_screen.dart index e19df9b..9493b23 100644 --- a/lib/screens/settings_screen/settings_screen.dart +++ b/lib/screens/settings_screen/settings_screen.dart @@ -1,6 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:gyawun_beta/utils/bottom_modals.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../generated/l10n.dart'; @@ -139,10 +140,9 @@ class _SettingsScreenState extends State { showPaymentsModal(BuildContext context) { showModalBottomSheet( useSafeArea: true, - backgroundColor: Theme.of(context).colorScheme.surface, + backgroundColor: Colors.transparent, context: context, - builder: (context) => Container( - padding: const EdgeInsets.all(16), + builder: (context) => BottomModalLayout( child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/services/bottom_message.dart b/lib/services/bottom_message.dart index 2486228..ac316c4 100644 --- a/lib/services/bottom_message.dart +++ b/lib/services/bottom_message.dart @@ -1,12 +1,13 @@ import 'package:flutter/material.dart'; class BottomMessage { - static showText(BuildContext context, String text) { + static showText(BuildContext context, String text, + {Duration duration = const Duration(milliseconds: 1000)}) { ScaffoldMessenger.of(context).clearSnackBars(); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text(text), - duration: const Duration(milliseconds: 1000), + duration: duration, ), ); } diff --git a/lib/services/media_player.dart b/lib/services/media_player.dart index 1fa32ab..07a8d6f 100644 --- a/lib/services/media_player.dart +++ b/lib/services/media_player.dart @@ -382,6 +382,7 @@ class MediaPlayer extends ChangeNotifier { Future stop() async { await _player.stop(); await _playlist.clear(); + await _player.seek(Duration.zero, index: 0); _currentIndex = null; _currentSong = null; notifyListeners(); diff --git a/lib/utils/bottom_modals.dart b/lib/utils/bottom_modals.dart index 3aee735..1c47168 100644 --- a/lib/utils/bottom_modals.dart +++ b/lib/utils/bottom_modals.dart @@ -7,6 +7,7 @@ import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:get_it/get_it.dart'; import 'package:go_router/go_router.dart'; +import 'package:gyawun_beta/utils/enhanced_image.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; @@ -14,7 +15,7 @@ import 'package:share_plus/share_plus.dart'; import 'package:url_launcher/url_launcher.dart'; import '../generated/l10n.dart'; -import '../screens/playlist_screen/browse_screen.dart'; +import '../screens/browse_screen/browse_screen.dart'; import '../screens/settings_screen/playback/equalizer_screen.dart'; import '../services/bottom_message.dart'; import '../services/download_manager.dart'; @@ -56,12 +57,14 @@ class Modals { BuildContext context, { String? title, String? hintText, + String doneText = 'Done', }) => showModalBottomSheet( context: context, useRootNavigator: false, backgroundColor: Colors.transparent, isScrollControlled: true, + useSafeArea: true, builder: (context) => _textFieldBottomModal(context, title: title, hintText: hintText), ); @@ -190,11 +193,6 @@ _confirmBottomModal(BuildContext context, padding: const EdgeInsets.symmetric(horizontal: 16), child: Row( mainAxisAlignment: MainAxisAlignment.end, - // spacing: 8, - // runSpacing: 8, - // runAlignment: WrapAlignment.end, - // crossAxisAlignment: WrapCrossAlignment.end, - // alignment: WrapAlignment.end, children: [ MaterialButton( color: Theme.of(context).colorScheme.primary.withAlpha(30), @@ -604,7 +602,8 @@ _updateDialog(BuildContext context, UpdateInfo? updateInfo) { ); } -_textFieldBottomModal(BuildContext context, {String? title, String? hintText}) { +_textFieldBottomModal(BuildContext context, + {String? title, String? hintText, String doneText = 'Done'}) { String? text; return BottomModalLayout( child: SingleChildScrollView( @@ -650,7 +649,7 @@ _textFieldBottomModal(BuildContext context, {String? title, String? hintText}) { Navigator.pop(context, text); }, child: Text( - 'Create', + doneText, style: TextStyle( color: Theme.of(context).scaffoldBackgroundColor), ), @@ -678,9 +677,15 @@ _playerOptionsModal(BuildContext context, Map song) { leading: ClipRRect( borderRadius: BorderRadius.circular(10), child: CachedNetworkImage( - imageUrl: song['thumbnails'].first['url'], + imageUrl: getEnhancedImage(song['thumbnails'].first['url']), height: 50, width: 50, + errorWidget: (context, url, error) { + return CachedNetworkImage( + imageUrl: getEnhancedImage(song['thumbnails'].first['url'], + quality: 'medium'), + ); + }, ), ), subtitle: song['subtitle'] != null @@ -774,7 +779,6 @@ _playerOptionsModal(BuildContext context, Map song) { }, ), ), - const SizedBox(height: 8) ], ), )); @@ -920,7 +924,6 @@ _songBottomModal(BuildContext context, Map song) { .cast()), )); }), - const SizedBox(height: 16), ], ), ), @@ -1071,6 +1074,8 @@ _playlistBottomModal(BuildContext context, Map playlist) { leading: const Icon(Icons.radar_outlined), onTap: () async { Navigator.pop(context); + BottomMessage.showText( + context, 'Songs will start playing soon.'); await GetIt.I().startRelated(Map.from(playlist), radio: true, isArtist: playlist['type'] == 'ARTIST'); }, @@ -1101,7 +1106,6 @@ _playlistBottomModal(BuildContext context, Map playlist) { BrowseScreen(endpoint: playlist['album']['endpoint']), )), ), - const SizedBox(height: 16), ], ), ), @@ -1118,21 +1122,22 @@ class BottomModalLayout extends StatelessWidget { @override Widget build(BuildContext context) { bool material = context.watch().materialColors; - return SafeArea( - child: Container( - width: double.maxFinite, - constraints: const BoxConstraints(maxWidth: 600), - margin: material ? EdgeInsets.zero : const EdgeInsets.all(8), - decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surfaceContainerLow, - borderRadius: BorderRadius.only( - topLeft: const Radius.circular(16), - topRight: const Radius.circular(16), - bottomLeft: Radius.circular(material ? 0 : 16), - bottomRight: Radius.circular(material ? 0 : 16), - ), + return Container( + width: double.maxFinite, + constraints: const BoxConstraints(maxWidth: 600), + margin: material ? EdgeInsets.zero : const EdgeInsets.all(8), + child: Material( + color: Theme.of(context).colorScheme.surfaceContainerLow, + borderRadius: BorderRadius.only( + topLeft: const Radius.circular(16), + topRight: const Radius.circular(16), + bottomLeft: Radius.circular(material ? 0 : 16), + bottomRight: Radius.circular(material ? 0 : 16), + ), + child: Padding( + padding: const EdgeInsets.only(bottom: 16), + child: child, ), - child: child, ), ); } diff --git a/lib/utils/enhanced_image.dart b/lib/utils/enhanced_image.dart new file mode 100644 index 0000000..5cf0ac8 --- /dev/null +++ b/lib/utils/enhanced_image.dart @@ -0,0 +1,44 @@ +String getEnhancedImage(String imageUrl, + {String quality = 'high', double? width}) { + if (width != null) { + return imageUrl + .trim() + .replaceAll('http:', 'https:') + .replaceAll('50x50', '${width.toInt()}x${width.toInt()}') + .replaceAll('150x150', '${width.toInt()}x${width.toInt()}') + .replaceAll('w60-h60', 'w${width.toInt()}-h${width.toInt()}') + .replaceAll('sddefault', 'mqdefault'); + } + switch (quality) { + case 'high': + return imageUrl + .trim() + .replaceAll('http:', 'https:') + .replaceAll('50x50', '500x500') + .replaceAll('150x150', '500x500') + .replaceAll('w60-h60', 'w500-h500') + .replaceAll('sddefault', 'mqdefault'); + case 'medium': + return imageUrl + .trim() + .replaceAll('http:', 'https:') + .replaceAll('50x50', '300x300') + .replaceAll('500x500', '300x300') + .replaceAll('w60-h60', 'w300-h300') + .replaceAll('sddefault', 'mqdefault'); + case 'low': + return imageUrl + .trim() + .replaceAll('http:', 'https:') + .replaceAll('150x150', '50x50') + .replaceAll('500x500', '50x50'); + default: + return imageUrl + .trim() + .replaceAll('http:', 'https:') + .replaceAll('50x50', '500x500') + .replaceAll('60x60', '500x500') + .replaceAll('150x150', '500x500') + .replaceAll('sddefault', 'maxresdefault'); + } +} diff --git a/lib/utils/router.dart b/lib/utils/router.dart index 9c8fa37..a3d4d7b 100644 --- a/lib/utils/router.dart +++ b/lib/utils/router.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:go_router/go_router.dart'; +import 'package:gyawun_beta/utils/pprint.dart'; import '../screens/download_screen/download_screen.dart'; import '../screens/home_screen/chip_screen.dart'; @@ -8,7 +9,7 @@ import '../screens/home_screen/search_screen/search_screen.dart'; import '../screens/library_screen/library_screen.dart'; import '../screens/main_screen/main_screen.dart'; import '../screens/main_screen/player_screen.dart'; -import '../screens/playlist_screen/browse_screen.dart'; +import '../screens/browse_screen/browse_screen.dart'; import '../screens/settings_screen/about/about_screen.dart'; import '../screens/settings_screen/appearence/appearence_screen.dart'; import '../screens/settings_screen/backup_restore/backup_restore_screen.dart';