From 0f34e70bc585caf8152c96992b80053f12f49e23 Mon Sep 17 00:00:00 2001 From: Hemant KArya <65885023+HemantKArya@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:55:32 +0530 Subject: [PATCH] library and addtoplaylist cubit fix -> 2.3.0 --- .github/workflows/main.yml | 8 +- .../cubit/add_to_playlist_cubit.dart | 62 +------- .../cubit/add_to_playlist_state.dart | 59 +++++--- .../cubit/connectivity_cubit.dart | 23 +++ .../cubit/connectivity_state.dart | 3 + .../library/cubit/library_items_cubit.dart | 125 ++++++++-------- .../library/cubit/library_items_state.dart | 25 ++-- .../search}/fetch_search_results.dart | 15 ++ lib/main.dart | 18 ++- lib/repository/Youtube/yt_charts_home.dart | 15 +- lib/routes_and_consts/routes.dart | 4 - .../screen/add_to_playlist_screen.dart | 116 ++++++++------- lib/screens/screen/chart/chart_widget.dart | 84 +++++++---- lib/screens/screen/library_screen.dart | 34 ++--- lib/screens/screen/search_screen.dart | 138 +++++++----------- .../screen/search_views/search_page.dart | 18 ++- .../widgets/mediaItemOptions_bottomsheet.dart | 3 +- lib/screens/widgets/sign_board_widget.dart | 41 ++++++ lib/services/db/bloomee_db_service.dart | 5 + lib/services/db/cubit/bloomee_db_cubit.dart | 10 +- lib/utils/load_Image.dart | 4 +- lib/utils/pallete_generator.dart | 2 +- pubspec.yaml | 7 +- 23 files changed, 441 insertions(+), 378 deletions(-) create mode 100644 lib/blocs/internet_connectivity/cubit/connectivity_cubit.dart create mode 100644 lib/blocs/internet_connectivity/cubit/connectivity_state.dart rename lib/{repository/cubits => blocs/search}/fetch_search_results.dart (93%) create mode 100644 lib/screens/widgets/sign_board_widget.dart diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba269e6..7793962 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,17 +43,17 @@ jobs: run: jarsigner --verify --verbose build/app/outputs/flutter-apk/app-release.apk - name: Rename APK file - run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.2.1+${{github.run_number}}.apk + run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/bloomee_tunes_v2.3.0+${{github.run_number}}.apk - name: Upload Artifacts uses: actions/upload-artifact@v2 with: name: Release path: | - build/app/outputs/flutter-apk/bloomee_tunes_v2.2.1+${{github.run_number}}.apk + build/app/outputs/flutter-apk/bloomee_tunes_v2.3.0+${{github.run_number}}.apk - name: Create Release uses: ncipollo/release-action@v1 with: - artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.2.1+${{github.run_number}}.apk" - tag: v2.2.1+${{github.run_number}} + artifacts: "build/app/outputs/flutter-apk/bloomee_tunes_v2.3.0+${{github.run_number}}.apk" + tag: v2.3.0+${{github.run_number}} token: ${{secrets.SECRET_KEY}} \ No newline at end of file diff --git a/lib/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart b/lib/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart index 7bdba5b..ae82c1a 100644 --- a/lib/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart +++ b/lib/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart @@ -1,70 +1,14 @@ // ignore_for_file: public_member_api_docs, sort_constructors_first -import 'dart:developer'; - import 'package:bloc/bloc.dart'; -import 'package:flutter/material.dart'; -import 'package:rxdart/rxdart.dart'; import 'package:Bloomee/model/songModel.dart'; import 'package:Bloomee/routes_and_consts/global_conts.dart'; -import 'package:Bloomee/services/db/cubit/bloomee_db_cubit.dart'; -import 'package:Bloomee/utils/load_Image.dart'; - -import '../../../model/MediaPlaylistModel.dart'; - part 'add_to_playlist_state.dart'; class AddToPlaylistCubit extends Cubit { - BloomeeDBCubit bloomeeDBCubit; - BehaviorSubject mediaItemModelBS = - BehaviorSubject.seeded(mediaItemModelNull); - AddToPlaylistCubit({ - required this.bloomeeDBCubit, - }) : super(AddToPlaylistInitial()) { - getAndEmitPlaylists(); - } - - List mediaPlaylist = []; - - AddToPlaylistState addToPlaylistState = - AddToPlaylistState(playlists: List.empty(growable: true)); - - Future getAndEmitPlaylists() async { - addToPlaylistState = - AddToPlaylistState(playlists: List.empty(growable: true)); - mediaPlaylist = await bloomeeDBCubit.getListOfPlaylists2(); - List _playlists = List.empty(growable: true); - if (addToPlaylistState.playlists.isNotEmpty) { - for (var element in addToPlaylistState.playlists) { - _playlists.add(element.playlistName ?? "Unknown"); - } - } - if (mediaPlaylist.length > 0) { - for (var element in mediaPlaylist) { - // if (_playlists.contains(element.albumName)) { - // int? _idx = _playlists.indexOf(element.albumName); - - // addToPlaylistState.playlists.removeAt(_idx); - // } - ImageProvider _tempProvider; - - if (element.mediaItems.length > 0) { - _tempProvider = - await getImageProvider(element.mediaItems[0].artUri.toString()); - } else { - _tempProvider = await getImageProvider(""); - } - PlaylistItemProperties _playlistItem = PlaylistItemProperties( - playlistName: element.albumName, - imageProvider: _tempProvider, - subTitle: "Saavan"); - addToPlaylistState.playlists.add(_playlistItem); + AddToPlaylistCubit() : super(AddToPlaylistInitial()); - // addToPlaylistState.playlistNames?.add(element.albumName); - // addToPlaylistState.subTitles?.add("Saavan"); - } - emit(state.copyWith(playlists: addToPlaylistState.playlists)); - log("emitted from addtoplaylist ${_playlists.toString()} - ${addToPlaylistState.playlists.length} - MediaPlaylists ${mediaPlaylist}"); - } + void setMediaItemModel(MediaItemModel mediaItemModel) { + emit(state.copyWith(mediaItemModel: mediaItemModel)); } } diff --git a/lib/blocs/add_to_playlist/cubit/add_to_playlist_state.dart b/lib/blocs/add_to_playlist/cubit/add_to_playlist_state.dart index 0783f33..3f843fc 100644 --- a/lib/blocs/add_to_playlist/cubit/add_to_playlist_state.dart +++ b/lib/blocs/add_to_playlist/cubit/add_to_playlist_state.dart @@ -1,44 +1,55 @@ +// ignore_for_file: public_member_api_docs, sort_constructors_first part of 'add_to_playlist_cubit.dart'; -class PlaylistItemProperties { - String? playlistName; - ImageProvider? imageProvider; - String? subTitle; - PlaylistItemProperties({ - required this.playlistName, - required this.imageProvider, - required this.subTitle, +// class PlaylistItemProperties { +// String? playlistName; +// ImageProvider? imageProvider; +// String? subTitle; +// PlaylistItemProperties({ +// required this.playlistName, +// required this.imageProvider, +// required this.subTitle, +// }); + +// @override +// bool operator ==(covariant PlaylistItemProperties other) { +// if (identical(this, other)) return true; + +// return other.playlistName == playlistName && +// other.imageProvider == imageProvider && +// other.subTitle == subTitle; +// } + +// @override +// int get hashCode => +// playlistName.hashCode ^ imageProvider.hashCode ^ subTitle.hashCode; +// } + +class AddToPlaylistState { + MediaItemModel mediaItemModel; + AddToPlaylistState({ + required this.mediaItemModel, }); @override - bool operator ==(covariant PlaylistItemProperties other) { + bool operator ==(covariant AddToPlaylistState other) { if (identical(this, other)) return true; - return other.playlistName == playlistName && - other.imageProvider == imageProvider && - other.subTitle == subTitle; + return other.mediaItemModel == mediaItemModel; } @override - int get hashCode => - playlistName.hashCode ^ imageProvider.hashCode ^ subTitle.hashCode; -} - -class AddToPlaylistState { - List playlists; - AddToPlaylistState({ - required this.playlists, - }); + int get hashCode => mediaItemModel.hashCode; AddToPlaylistState copyWith({ - List? playlists, + MediaItemModel? mediaItemModel, }) { return AddToPlaylistState( - playlists: playlists ?? this.playlists, + mediaItemModel: mediaItemModel ?? this.mediaItemModel, ); } } final class AddToPlaylistInitial extends AddToPlaylistState { - AddToPlaylistInitial() : super(playlists: List.empty()); + AddToPlaylistInitial() : super(mediaItemModel: mediaItemModelNull); } diff --git a/lib/blocs/internet_connectivity/cubit/connectivity_cubit.dart b/lib/blocs/internet_connectivity/cubit/connectivity_cubit.dart new file mode 100644 index 0000000..11324cb --- /dev/null +++ b/lib/blocs/internet_connectivity/cubit/connectivity_cubit.dart @@ -0,0 +1,23 @@ +import 'dart:async'; +import 'package:bloc/bloc.dart'; +import 'package:connectivity_plus/connectivity_plus.dart'; +part 'connectivity_state.dart'; + +class ConnectivityCubit extends Cubit { + StreamSubscription? _subscription; + ConnectivityCubit() : super(ConnectivityState.disconnected) { + _subscription = Connectivity().onConnectivityChanged.listen((event) { + if (event == ConnectivityResult.none || + event == ConnectivityResult.bluetooth) { + emit(ConnectivityState.disconnected); + } else { + emit(ConnectivityState.connected); + } + }); + } + @override + Future close() { + _subscription?.cancel(); + return super.close(); + } +} diff --git a/lib/blocs/internet_connectivity/cubit/connectivity_state.dart b/lib/blocs/internet_connectivity/cubit/connectivity_state.dart new file mode 100644 index 0000000..b8b766f --- /dev/null +++ b/lib/blocs/internet_connectivity/cubit/connectivity_state.dart @@ -0,0 +1,3 @@ +part of 'connectivity_cubit.dart'; + +enum ConnectivityState { connected, disconnected } diff --git a/lib/blocs/library/cubit/library_items_cubit.dart b/lib/blocs/library/cubit/library_items_cubit.dart index 72a9ade..a3c8f7c 100644 --- a/lib/blocs/library/cubit/library_items_cubit.dart +++ b/lib/blocs/library/cubit/library_items_cubit.dart @@ -2,86 +2,93 @@ import 'dart:developer'; import 'package:bloc/bloc.dart'; -import 'package:flutter/material.dart'; -import 'package:Bloomee/model/MediaPlaylistModel.dart'; -import 'package:Bloomee/services/db/GlobalDB.dart'; +import 'package:equatable/equatable.dart'; +import 'package:Bloomee/model/songModel.dart'; +import 'package:Bloomee/screens/widgets/snackbar.dart'; +import 'package:Bloomee/services/db/GlobalDB.dart'; +import 'package:Bloomee/services/db/bloomee_db_service.dart'; import 'package:Bloomee/services/db/cubit/bloomee_db_cubit.dart'; -import 'package:Bloomee/utils/load_Image.dart'; part 'library_items_state.dart'; class LibraryItemsCubit extends Cubit { + Stream? playlistWatcherDB; + List playlistItems = List.empty(); BloomeeDBCubit bloomeeDBCubit; - List mediaPlaylist = []; - LibraryItemsState libraryItemsState = - LibraryItemsState(playlists: List.empty(growable: true)); + List mediaPlaylistsDB = []; - LibraryItemsCubit({required this.bloomeeDBCubit}) - : super(LibraryItemsInitial()) { - bloomeeDBCubit.refreshLibrary.listen( - (value) { - log(value.toString(), name: "libItemsCubit"); - if (value) { - getAndEmitPlaylists(); - log("got refresh command", name: "libItemsCubit"); - } - }, - ); + LibraryItemsCubit({ + required this.bloomeeDBCubit, + }) : super(LibraryItemsInitial()) { getAndEmitPlaylists(); + getDBWatcher(); } - Future getAndEmitPlaylists() async { - List _playlists = List.empty(growable: true); - libraryItemsState = - LibraryItemsState(playlists: List.empty(growable: true)); - - mediaPlaylist = await bloomeeDBCubit.getListOfPlaylists2(); - - // List _playlists = List.empty(growable: true); - - // if (libraryItemsState.playlists.isNotEmpty) { - // for (var element in libraryItemsState.playlists) { - // _playlists.add(element.playlistName ?? "Unknown"); - // } - // libraryItemsState.playlists = []; - // } - libraryItemsState.playlists.clear(); - log("emitted from library0 ${_playlists.length} - MediaPlaylists ${mediaPlaylist.length}", - name: "libItemsCubit"); + Future getDBWatcher() async { + playlistWatcherDB = await BloomeeDBService.getPlaylistsWatcher(); + playlistWatcherDB?.listen((event) { + getAndEmitPlaylists(); + }); + } - if (mediaPlaylist.length > 0) { - for (var element in mediaPlaylist) { - ImageProvider _tempProvider; + Future getAndEmitPlaylists() async { + mediaPlaylistsDB = await BloomeeDBService.getPlaylists4Library(); + if (mediaPlaylistsDB.isNotEmpty) { + playlistItems = mediaPlaylistsDB2ItemProperties(mediaPlaylistsDB); - if (element.mediaItems.length > 0) { - _tempProvider = - await getImageProvider(element.mediaItems[0].artUri.toString()); - } else { - _tempProvider = await getImageProvider(""); - } - PlaylistItemProperties _playlistItem = PlaylistItemProperties( - playlistName: element.albumName, - imageProvider: _tempProvider, - subTitle: "${element.mediaItems.length} Items"); - // libraryItemsState.playlists.add(_playlistItem); - _playlists.add(_playlistItem); + emit(LibraryItemsState(playlists: playlistItems)); + } else { + emit(LibraryItemsInitial()); + } + } - // libraryItemsState.playlistNames?.add(element.albumName); - // libraryItemsState.subTitles?.add("Saavan"); - } - if (_playlists.length == mediaPlaylist.length) { - emit(state.copyWith(playlists: _playlists)); + List mediaPlaylistsDB2ItemProperties( + List _mediaPlaylistsDB) { + List _playlists = List.empty(growable: true); + if (_mediaPlaylistsDB.isNotEmpty) { + for (var element in _mediaPlaylistsDB) { + log("${element.playlistName}", name: "libItemCubit"); + _playlists.add( + PlaylistItemProperties( + playlistName: element.playlistName, + subTitle: "${element.mediaItems.length} Items", + coverImgUrl: element.mediaItems.isNotEmpty + ? element.mediaItems.first.artURL + : null, + ), + ); } - log("emitted from library ${_playlists.length} - MediaPlaylists ${mediaPlaylist.length}", - name: "libItemsCubit"); } + return _playlists; } void removePlaylist(MediaPlaylistDB mediaPlaylistDB) { if (mediaPlaylistDB.playlistName != "Null") { - bloomeeDBCubit.removePlaylist(mediaPlaylistDB); + BloomeeDBService.removePlaylist(mediaPlaylistDB); + // getAndEmitPlaylists(); + SnackbarService.showMessage( + "Playlist ${mediaPlaylistDB.playlistName} removed"); + } + } + + void addToPlaylist( + MediaItemModel mediaItem, MediaPlaylistDB mediaPlaylistDB) { + if (mediaPlaylistDB.playlistName != "Null") { + bloomeeDBCubit.addMediaItemToPlaylist(mediaItem, mediaPlaylistDB); + getAndEmitPlaylists(); + SnackbarService.showMessage( + "Added ${mediaItem.title} to ${mediaPlaylistDB.playlistName}"); + } + } + + void removeFromPlaylist( + MediaItemModel mediaItem, MediaPlaylistDB mediaPlaylistDB) { + if (mediaPlaylistDB.playlistName != "Null") { + bloomeeDBCubit.removeMediaFromPlaylist(mediaItem, mediaPlaylistDB); getAndEmitPlaylists(); + SnackbarService.showMessage( + "Removed ${mediaItem.title} from ${mediaPlaylistDB.playlistName}"); } } } diff --git a/lib/blocs/library/cubit/library_items_state.dart b/lib/blocs/library/cubit/library_items_state.dart index fb54420..6eaf0fc 100644 --- a/lib/blocs/library/cubit/library_items_state.dart +++ b/lib/blocs/library/cubit/library_items_state.dart @@ -1,31 +1,21 @@ // ignore_for_file: public_member_api_docs, sort_constructors_first part of 'library_items_cubit.dart'; -class PlaylistItemProperties { - String? playlistName; - ImageProvider? imageProvider; +class PlaylistItemProperties extends Equatable { + final String playlistName; + String? coverImgUrl; String? subTitle; PlaylistItemProperties({ required this.playlistName, - required this.imageProvider, + required this.coverImgUrl, required this.subTitle, }); @override - bool operator ==(covariant PlaylistItemProperties other) { - if (identical(this, other)) return true; - - return other.playlistName == playlistName && - other.imageProvider == imageProvider && - other.subTitle == subTitle; - } - - @override - int get hashCode => - playlistName.hashCode ^ imageProvider.hashCode ^ subTitle.hashCode; + List get props => [playlistName]; } -class LibraryItemsState { +class LibraryItemsState extends Equatable { List playlists; LibraryItemsState({ required this.playlists, @@ -38,6 +28,9 @@ class LibraryItemsState { playlists: playlists ?? this.playlists, ); } + + @override + List get props => [playlists]; } final class LibraryItemsInitial extends LibraryItemsState { diff --git a/lib/repository/cubits/fetch_search_results.dart b/lib/blocs/search/fetch_search_results.dart similarity index 93% rename from lib/repository/cubits/fetch_search_results.dart rename to lib/blocs/search/fetch_search_results.dart index eacf223..a0f1479 100644 --- a/lib/repository/cubits/fetch_search_results.dart +++ b/lib/blocs/search/fetch_search_results.dart @@ -160,4 +160,19 @@ class FetchSearchResultsCubit extends Cubit { loadingState: LoadingState.loaded)); log("got all searches ${_mediaItemList.length}", name: "FetchSearchRes"); } + + void clearSearch() { + emit(FetchSearchResultsInitial()); + } + + Future> getSearchSuggestions(String query) async { + List searchSuggestions; + try { + searchSuggestions = await YouTubeServices() + .getSearchSuggestions(query: query) as List; + } catch (e) { + searchSuggestions = []; + } + return searchSuggestions; + } } diff --git a/lib/main.dart b/lib/main.dart index 950871a..fdfc820 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io' as io; +import 'package:Bloomee/blocs/internet_connectivity/cubit/connectivity_cubit.dart'; import 'package:Bloomee/blocs/settings_cubit/cubit/settings_cubit.dart'; import 'package:Bloomee/model/MediaPlaylistModel.dart'; import 'package:Bloomee/model/songModel.dart'; @@ -13,7 +14,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:Bloomee/blocs/add_to_playlist/cubit/add_to_playlist_cubit.dart'; import 'package:Bloomee/blocs/library/cubit/library_items_cubit.dart'; import 'package:Bloomee/repository/Saavn/cubit/saavn_repository_cubit.dart'; -import 'package:Bloomee/repository/cubits/fetch_search_results.dart'; +import 'package:Bloomee/blocs/search/fetch_search_results.dart'; import 'package:Bloomee/routes_and_consts/routes.dart'; import 'package:Bloomee/screens/screen/library_views/cubit/current_playlist_cubit.dart'; import 'package:Bloomee/screens/screen/library_views/cubit/import_playlist_cubit.dart'; @@ -21,6 +22,7 @@ import 'package:Bloomee/services/db/cubit/bloomee_db_cubit.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:receive_sharing_intent/receive_sharing_intent.dart'; import 'blocs/mediaPlayer/bloomee_player_cubit.dart'; +import 'package:flutter_displaymode/flutter_displaymode.dart'; bool isYoutubeLink(String link) { if (link.contains("youtube.com") || link.contains("youtu.be")) { @@ -78,6 +80,12 @@ void ProcessIncomingIntent(List _sharedFiles) { } } +Future setHighRefreshRate() async { + if (io.Platform.isAndroid) { + await FlutterDisplayMode.setHighRefreshRate(); + } +} + late BloomeePlayerCubit bloomeePlayerCubit; void setupPlayerCubit() { bloomeePlayerCubit = BloomeePlayerCubit(); @@ -85,6 +93,7 @@ void setupPlayerCubit() { void main() { WidgetsFlutterBinding.ensureInitialized(); + setHighRefreshRate(); try { dotenv.load(fileName: "assets/.env"); @@ -159,6 +168,10 @@ class _MyAppState extends State { create: (context) => SettingsCubit(), lazy: false, ), + BlocProvider( + create: (context) => ConnectivityCubit(), + lazy: false, + ), BlocProvider( create: (context) => CurrentPlaylistCubit( bloomeeDBCubit: context.read()), @@ -169,8 +182,7 @@ class _MyAppState extends State { LibraryItemsCubit(bloomeeDBCubit: context.read()), ), BlocProvider( - create: (context) => AddToPlaylistCubit( - bloomeeDBCubit: context.read()), + create: (context) => AddToPlaylistCubit(), lazy: false, ), BlocProvider( diff --git a/lib/repository/Youtube/yt_charts_home.dart b/lib/repository/Youtube/yt_charts_home.dart index 2c9b7fa..26b1dc8 100644 --- a/lib/repository/Youtube/yt_charts_home.dart +++ b/lib/repository/Youtube/yt_charts_home.dart @@ -64,14 +64,23 @@ Future> fetchTrendingVideos() async { // for (var types in data) { chartItems = []; + String img; for (var i in data) { String title = i['name']; // String views = i['viewCount']; // String id = i['id']; - String img = i['thumbnail']['thumbnails'][0]['url']; + try { + img = i['thumbnail']['thumbnails'][0]['url']; + } catch (e) { + img = "null"; + } List artists = []; - for (var artist in i['artists']) { - artists.add(artist['name']); + try { + for (var artist in i['artists']) { + artists.add(artist['name']); + } + } catch (e) { + artists.add("Unknown"); } chartItems.add(ChartItemModel( diff --git a/lib/routes_and_consts/routes.dart b/lib/routes_and_consts/routes.dart index ed40c0e..3773e78 100644 --- a/lib/routes_and_consts/routes.dart +++ b/lib/routes_and_consts/routes.dart @@ -1,8 +1,4 @@ -import 'package:Bloomee/blocs/explore/cubit/explore_cubits.dart'; -import 'package:Bloomee/model/chart_model.dart'; -import 'package:Bloomee/plugins/chart_defines.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:Bloomee/routes_and_consts/global_str_consts.dart'; import 'package:Bloomee/screens/screen/add_to_playlist_screen.dart'; diff --git a/lib/screens/screen/add_to_playlist_screen.dart b/lib/screens/screen/add_to_playlist_screen.dart index 788e623..8e6f56a 100644 --- a/lib/screens/screen/add_to_playlist_screen.dart +++ b/lib/screens/screen/add_to_playlist_screen.dart @@ -1,3 +1,5 @@ +import 'package:Bloomee/blocs/library/cubit/library_items_cubit.dart'; +import 'package:Bloomee/screens/widgets/sign_board_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; @@ -31,9 +33,8 @@ class _AddToPlaylistScreenState extends State { setState(() { filteredPlaylistsItems = playlistsItems.where((element) { return element.playlistName - ?.toLowerCase() - .contains(query.toLowerCase()) ?? - false; + .toLowerCase() + .contains(query.toLowerCase()); }).toList(); }); } else { @@ -47,7 +48,7 @@ class _AddToPlaylistScreenState extends State { void initState() { // TODO: implement initState super.initState(); - context.read().getAndEmitPlaylists(); + // context.read().getAndEmitPlaylists(); } MediaItemModel currentMediaModel = mediaItemModelNull; @@ -70,11 +71,16 @@ class _AddToPlaylistScreenState extends State { ), body: Column( children: [ - StreamBuilder( - stream: context.watch().mediaItemModelBS, - builder: (context, snapshot) { - if (snapshot.hasData && snapshot.data != mediaItemModelNull) { - currentMediaModel = snapshot.data ?? mediaItemModelNull; + BlocBuilder( + builder: (context, state) { + if (state is AddToPlaylistInitial) { + return const Center( + child: CircularProgressIndicator( + color: Default_Theme.accentColor2, + )); + } else { + if (state.mediaItemModel != mediaItemModelNull) { + currentMediaModel = state.mediaItemModel; return Wrap( children: [ Padding( @@ -88,7 +94,7 @@ class _AddToPlaylistScreenState extends State { width: 80, height: 80, child: loadImageCached( - snapshot.data?.artUri.toString() ?? ""), + state.mediaItemModel.artUri.toString()), ), ), Expanded( @@ -98,7 +104,7 @@ class _AddToPlaylistScreenState extends State { Padding( padding: const EdgeInsets.only(bottom: 5), child: Text( - snapshot.data?.title ?? "Unknown", + state.mediaItemModel.title, maxLines: 2, overflow: TextOverflow.ellipsis, style: Default_Theme.secondoryTextStyle @@ -110,7 +116,7 @@ class _AddToPlaylistScreenState extends State { ), ), Text( - snapshot.data?.artist ?? "Unknown", + state.mediaItemModel.artist ?? "Unknown", maxLines: 2, textAlign: TextAlign.start, overflow: TextOverflow.ellipsis, @@ -137,7 +143,9 @@ class _AddToPlaylistScreenState extends State { } else { return const CircularProgressIndicator(); } - }), + } + }, + ), Padding( padding: const EdgeInsets.all(8.0), child: TextField( @@ -151,13 +159,13 @@ class _AddToPlaylistScreenState extends State { decoration: InputDecoration( filled: true, fillColor: Default_Theme.primaryColor2.withOpacity(0.07), - contentPadding: const EdgeInsets.only(top: 20), - hintText: "What you want to listen?", + contentPadding: const EdgeInsets.only(top: 20, left: 15), + hintText: "Search you playlist..", hintStyle: TextStyle( color: Default_Theme.primaryColor1.withOpacity(0.4), fontFamily: "Gilroy"), enabledBorder: OutlineInputBorder( - borderSide: BorderSide(style: BorderStyle.none), + borderSide: const BorderSide(style: BorderStyle.none), borderRadius: BorderRadius.circular(50)), focusedBorder: OutlineInputBorder( borderSide: BorderSide( @@ -166,44 +174,50 @@ class _AddToPlaylistScreenState extends State { ), ), Expanded( - child: BlocBuilder( + child: BlocBuilder( builder: (context, state) { - playlistsItems = state.playlists; - // filteredPlaylistsItems = state.playlists; - final _finalList = filteredPlaylistsItems.isEmpty || - _searchController.text.isEmpty - ? playlistsItems - : filteredPlaylistsItems; - return ListView.builder( - itemCount: _finalList.length, - itemBuilder: (context, index) { - return Padding( - padding: const EdgeInsets.only(top: 8, left: 10), - child: InkWell( - onTap: () { - if (_finalList[index].playlistName != null && - currentMediaModel != mediaItemModelNull) { - context - .read() - .addMediaItemToPlaylist( + if (state is LibraryItemsInitial) { + return const SignBoardWidget( + message: "No Playlists Yet", + icon: MingCute.playlist_line); + } else { + playlistsItems = state.playlists; + final _finalList = filteredPlaylistsItems.isEmpty || + _searchController.text.isEmpty + ? playlistsItems + : filteredPlaylistsItems; + return ListView.builder( + itemCount: _finalList.length, + itemBuilder: (context, index) { + if (_finalList[index].playlistName == "recently_played") { + return const SizedBox(); + } else { + return Padding( + padding: const EdgeInsets.only(top: 8, left: 10), + child: InkWell( + onTap: () { + if (currentMediaModel != mediaItemModelNull) { + context.read().addToPlaylist( currentMediaModel, MediaPlaylistDB( - playlistName: - _finalList[index].playlistName!)); - context.pop(context); - } - }, - child: SmallPlaylistCard( - playListTitle: - _finalList[index].playlistName ?? "Unknown", - coverArt: - Image(image: _finalList[index].imageProvider!), - playListsubTitle: - _finalList[index].subTitle ?? "Unverified"), - ), - ); - }, - ); + playlistName: + _finalList[index].playlistName, + )); + context.pop(context); + } + }, + child: SmallPlaylistCard( + playListTitle: _finalList[index].playlistName, + coverArt: loadImageCached( + _finalList[index].coverImgUrl ?? "null"), + playListsubTitle: + _finalList[index].subTitle ?? "Unverified"), + ), + ); + } + }, + ); + } }, ), ) diff --git a/lib/screens/screen/chart/chart_widget.dart b/lib/screens/screen/chart/chart_widget.dart index 7667ee5..28d8d90 100644 --- a/lib/screens/screen/chart/chart_widget.dart +++ b/lib/screens/screen/chart/chart_widget.dart @@ -1,10 +1,14 @@ +// ignore_for_file: public_member_api_docs, sort_constructors_first +// import 'dart:math'; import 'dart:math'; +import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:icons_plus/icons_plus.dart'; + import 'package:Bloomee/blocs/explore/cubit/explore_cubits.dart'; import 'package:Bloomee/plugins/chart_defines.dart'; import 'package:Bloomee/utils/load_Image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; class ChartWidget extends StatefulWidget { final ChartInfo chartInfo; @@ -19,36 +23,31 @@ class ChartWidget extends StatefulWidget { // create a class which have 2 color variable for text and background class TextColorPair { - final Color textColor; - final Color backgroundColor; - + final Color color1; + final Color color2; TextColorPair({ - required this.textColor, - required this.backgroundColor, + required this.color1, + required this.color2, }); } // create list of color pair which have some light colors with text color, use proffessinoal colors like pastel colors final List colorPair = [ TextColorPair( - textColor: const Color.fromARGB(255, 0, 0, 0), - backgroundColor: const Color.fromARGB(255, 255, 141, 141), - ), - TextColorPair( - textColor: const Color.fromARGB(255, 0, 0, 0), - backgroundColor: const Color.fromARGB(255, 132, 255, 253), + color1: const Color.fromARGB(255, 223, 205, 0).withOpacity(0.8), + color2: const Color.fromARGB(255, 205, 135, 23).withOpacity(0.0), ), TextColorPair( - textColor: const Color.fromARGB(255, 0, 0, 0), - backgroundColor: const Color.fromARGB(255, 255, 179, 92), + color1: const Color.fromARGB(255, 255, 173, 50).withOpacity(0.8), + color2: const Color.fromARGB(255, 205, 132, 23).withOpacity(0.0), ), TextColorPair( - textColor: const Color.fromARGB(255, 0, 0, 0), - backgroundColor: const Color.fromARGB(255, 255, 129, 154), + color1: const Color.fromARGB(255, 0, 115, 223).withOpacity(0.8), + color2: const Color.fromARGB(255, 23, 96, 205).withOpacity(0.0), ), TextColorPair( - textColor: const Color.fromARGB(255, 0, 0, 0), - backgroundColor: const Color.fromARGB(255, 76, 255, 163), + color1: const Color.fromARGB(255, 223, 0, 123).withOpacity(0.8), + color2: const Color.fromARGB(255, 205, 23, 56).withOpacity(0.0), ), ]; @@ -74,20 +73,42 @@ class _ChartWidgetState extends State { BlocBuilder( bloc: BlocProvider.of(context), builder: (context, state) { - return state is ChartInitial - ? const SizedBox() - : SizedBox( - height: 600, - width: 270, - child: loadImageCached(state.coverImg), - ); + return AnimatedSwitcher( + duration: const Duration(seconds: 1), + child: state is ChartInitial + ? Stack(children: [ + Container( + color: const Color.fromARGB(255, 52, 0, 147), + ), + const Center( + child: Icon(MingCute.music_2_fill, + size: 80, color: Colors.white), + ), + ]) + : SizedBox( + height: 600, + width: 270, + child: loadImageCached(state.coverImg), + ), + ); }, ), Positioned( child: ClipPath( clipper: ChartCardClipper(), child: Container( - color: _color.backgroundColor.withOpacity(0.8), + // color: Color.fromARGB(255, 255, 35, 196).withOpacity(0.5), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.bottomRight, + end: Alignment.topLeft, + colors: [ + _color.color1, + _color.color2, + ], + ), + ), + // color: _color.backgroundColor.withOpacity(0.7), ), ), ), @@ -103,11 +124,12 @@ class _ChartWidgetState extends State { textAlign: TextAlign.right, overflow: TextOverflow.ellipsis, textWidthBasis: TextWidthBasis.parent, - style: TextStyle( - color: _color.textColor.withOpacity(0.95), - fontSize: 27, + style: const TextStyle( + // color: _color.textColor.withOpacity(0.95), + color: Color.fromARGB(255, 255, 255, 255), + fontSize: 28, fontFamily: "Unageo", - fontWeight: FontWeight.w900, + fontWeight: FontWeight.w700, ), ), ), diff --git a/lib/screens/screen/library_screen.dart b/lib/screens/screen/library_screen.dart index 3581287..045e24d 100644 --- a/lib/screens/screen/library_screen.dart +++ b/lib/screens/screen/library_screen.dart @@ -1,3 +1,5 @@ +import 'package:Bloomee/screens/widgets/sign_board_widget.dart'; +import 'package:Bloomee/utils/load_Image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; @@ -31,21 +33,13 @@ class LibraryScreen extends StatelessWidget { builder: (context, state) { return AnimatedSwitcher( duration: const Duration(seconds: 1), - child: state.playlists.isNotEmpty + child: state != LibraryItemsInitial() ? ListOfPlaylists( state: state, ) - : Center( - child: SizedBox( - width: 100, - height: 50, - child: Text( - "Get started by adding items to library!!", - style: Default_Theme.secondoryTextStyle.merge( - const TextStyle( - color: Default_Theme.primaryColor2)), - ), - ), + : const SignBoardWidget( + message: "No Playlists Yet\nCreate One Now!", + icon: MingCute.playlist_line, ), ); }, @@ -139,8 +133,7 @@ class _ListOfPlaylistsState extends State { context.read().removePlaylist( MediaPlaylistDB( playlistName: - widget.state.playlists[index].playlistName ?? - "Null")); + widget.state.playlists[index].playlistName)); setState(() { widget.state.playlists.removeAt(index); }); @@ -148,17 +141,12 @@ class _ListOfPlaylistsState extends State { child: InkWell( onTap: () => context .pushNamed(GlobalStrConsts.playlistView, pathParameters: { - "playlistName": - widget.state.playlists[index].playlistName ?? "Liked" + "playlistName": widget.state.playlists[index].playlistName }), child: SmallPlaylistCard( - playListTitle: - widget.state.playlists[index].playlistName ?? - "Unknown", - coverArt: Image( - image: widget.state.playlists[index].imageProvider!, - fit: BoxFit.fitHeight, - ), + playListTitle: widget.state.playlists[index].playlistName, + coverArt: loadImageCached( + widget.state.playlists[index].coverImgUrl.toString()), playListsubTitle: widget.state.playlists[index].subTitle ?? "Unknown"), ), diff --git a/lib/screens/screen/search_screen.dart b/lib/screens/screen/search_screen.dart index 6988c5d..5baa10a 100644 --- a/lib/screens/screen/search_screen.dart +++ b/lib/screens/screen/search_screen.dart @@ -1,12 +1,16 @@ // ignore_for_file: public_member_api_docs, sort_constructors_first import 'dart:developer'; + +import 'package:Bloomee/screens/widgets/sign_board_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:Bloomee/repository/cubits/fetch_search_results.dart'; +import 'package:icons_plus/icons_plus.dart'; + +import 'package:Bloomee/blocs/internet_connectivity/cubit/connectivity_cubit.dart'; +import 'package:Bloomee/blocs/search/fetch_search_results.dart'; import 'package:Bloomee/screens/screen/search_views/search_page.dart'; import 'package:Bloomee/screens/widgets/horizontalSongCard_widget.dart'; import 'package:Bloomee/theme_data/default.dart'; -import 'package:icons_plus/icons_plus.dart'; class SearchScreen extends StatefulWidget { String searchQuery = ""; @@ -49,7 +53,7 @@ class _SearchScreenState extends State { setState(() { _selectedSearchEngine = index; _sourceEngine = sourceEngine; - if (_textEditingController.text.toString().length > 0) { + if (_textEditingController.text.toString().isNotEmpty) { log("Search Engine ${sourceEngine.toString()}", name: "SearchScreen"); context.read().search( @@ -158,88 +162,56 @@ class _SearchScreenState extends State { backgroundColor: Default_Theme.themeColor, ), backgroundColor: Default_Theme.themeColor, - body: BlocBuilder( + body: BlocBuilder( builder: (context, state) { - if (state is FetchSearchResultsLoading) { - return const Center( - child: CircularProgressIndicator( - color: Default_Theme.accentColor2, - ), - ); - } else if (state.loadingState == LoadingState.loaded) { - if (state.mediaItems.isNotEmpty) { - return ListView.builder( - physics: const BouncingScrollPhysics(), - itemCount: state.mediaItems.length, - itemBuilder: (context, index) { - return Padding( - padding: - const EdgeInsets.only(left: 18, bottom: 5, right: 18), - child: HorizontalSongCardWidget( - index: index, - mediaPlaylist: state, - showLiked: true, - ), - ); - }, - ); - } else { - return Center( - child: Wrap( - children: [ - Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Icon( - MingCute.sweats_line, - color: - Default_Theme.primaryColor2.withOpacity(0.7), - size: 40, - ), - ), - Text( - "No results found!\nTry another keyword or source engine!", - textAlign: TextAlign.center, - style: Default_Theme.tertiaryTextStyle.merge( - TextStyle( - color: Default_Theme.primaryColor2 - .withOpacity(0.7), - fontSize: 14)), - ), - ], + return AnimatedSwitcher( + duration: const Duration(milliseconds: 600), + child: state == ConnectivityState.disconnected + ? const SignBoardWidget( + icon: MingCute.wifi_off_line, + message: "No internet connection!", ) - ], - ), - ); - } - } else { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Icon( - Icons.search_rounded, - color: Default_Theme.primaryColor2.withOpacity(0.4), - ), - ), - Padding( - padding: const EdgeInsets.all(15.0), - child: Text( - "Type the keyword and try to search again!", - softWrap: true, - textAlign: TextAlign.center, - style: Default_Theme.tertiaryTextStyle.merge(TextStyle( - color: - Default_Theme.primaryColor2.withOpacity(0.6))), - ), - ), - ], - ), - ); - } + : BlocBuilder( + builder: (context, state) { + if (state is FetchSearchResultsLoading) { + return const Center( + child: CircularProgressIndicator( + color: Default_Theme.accentColor2, + ), + ); + } else if (state.loadingState == + LoadingState.loaded) { + if (state.mediaItems.isNotEmpty) { + return ListView.builder( + physics: const BouncingScrollPhysics(), + itemCount: state.mediaItems.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.only( + left: 18, bottom: 5, right: 18), + child: HorizontalSongCardWidget( + index: index, + mediaPlaylist: state, + showLiked: true, + ), + ); + }, + ); + } else { + return const SignBoardWidget( + message: + "No results found!\nTry another keyword or source engine!", + icon: MingCute.sweats_line); + } + } else { + return const SignBoardWidget( + message: + "Search for your favorite songs\nand discover new ones!", + icon: MingCute.search_2_line); + } + }, + )); }, ), ), diff --git a/lib/screens/screen/search_views/search_page.dart b/lib/screens/screen/search_views/search_page.dart index 177fcf0..e33639a 100644 --- a/lib/screens/screen/search_views/search_page.dart +++ b/lib/screens/screen/search_views/search_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:Bloomee/repository/Youtube/youtube_api.dart'; -import 'package:Bloomee/repository/cubits/fetch_search_results.dart'; +import 'package:Bloomee/blocs/search/fetch_search_results.dart'; import 'package:Bloomee/theme_data/default.dart'; import 'package:icons_plus/icons_plus.dart'; @@ -95,12 +95,20 @@ class searchPageDelegate extends SearchDelegate { // final List suggestionList = []; return FutureBuilder( - future: YouTubeServices().getSearchSuggestions(query: query), + future: + context.read().getSearchSuggestions(query), builder: (context, snapshot) { - if (!snapshot.hasData) { - return const Center(child: CircularProgressIndicator()); + if (!snapshot.hasData || snapshot.data == null) { + return const Center( + child: CircularProgressIndicator( + color: Default_Theme.accentColor2, + )); + } else if (snapshot.data!.isEmpty) { + return const Center( + child: Text('No suggestions found'), + ); } - List suggestionList = snapshot.data! as List; + List suggestionList = snapshot.data!; return ListView.builder( itemCount: suggestionList.length, itemBuilder: (context, index) { diff --git a/lib/screens/widgets/mediaItemOptions_bottomsheet.dart b/lib/screens/widgets/mediaItemOptions_bottomsheet.dart index 2e971fc..b53b237 100644 --- a/lib/screens/widgets/mediaItemOptions_bottomsheet.dart +++ b/lib/screens/widgets/mediaItemOptions_bottomsheet.dart @@ -102,8 +102,7 @@ void showMediaItemOptions(BuildContext context, MediaItemModel mediaItemModel) { onTap: () { context .read() - .mediaItemModelBS - .add(mediaItemModel); + .setMediaItemModel(mediaItemModel); context.pushNamed(GlobalStrConsts.addToPlaylistScreen); context.pop(context); }, diff --git a/lib/screens/widgets/sign_board_widget.dart b/lib/screens/widgets/sign_board_widget.dart new file mode 100644 index 0000000..d73856b --- /dev/null +++ b/lib/screens/widgets/sign_board_widget.dart @@ -0,0 +1,41 @@ +import 'package:Bloomee/theme_data/default.dart'; +import 'package:flutter/material.dart'; + +class SignBoardWidget extends StatelessWidget { + final String message; + final IconData icon; + const SignBoardWidget({ + Key? key, + required this.message, + required this.icon, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Center( + child: Wrap( + children: [ + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Icon( + icon, + color: Default_Theme.primaryColor2.withOpacity(0.7), + size: 40, + ), + ), + Text( + message, + textAlign: TextAlign.center, + style: Default_Theme.tertiaryTextStyle.merge(TextStyle( + color: Default_Theme.primaryColor2.withOpacity(0.7), + fontSize: 14)), + ), + ], + ) + ], + ), + ); + } +} diff --git a/lib/services/db/bloomee_db_service.dart b/lib/services/db/bloomee_db_service.dart index e7244f5..55b7108 100644 --- a/lib/services/db/bloomee_db_service.dart +++ b/lib/services/db/bloomee_db_service.dart @@ -248,6 +248,11 @@ class BloomeeDBService { return await isarDB.mediaPlaylistDBs.where().findAll(); } + static Future> getPlaylistsWatcher() async { + Isar isarDB = await db; + return isarDB.mediaPlaylistDBs.watchLazy(fireImmediately: true); + } + static Future removePlaylist(MediaPlaylistDB mediaPlaylistDB) async { Isar isarDB = await db; bool _res = false; diff --git a/lib/services/db/cubit/bloomee_db_cubit.dart b/lib/services/db/cubit/bloomee_db_cubit.dart index 62a4017..244b754 100644 --- a/lib/services/db/cubit/bloomee_db_cubit.dart +++ b/lib/services/db/cubit/bloomee_db_cubit.dart @@ -13,7 +13,7 @@ import 'package:Bloomee/services/db/bloomee_db_service.dart'; part 'bloomee_db_state.dart'; class BloomeeDBCubit extends Cubit { - BehaviorSubject refreshLibrary = BehaviorSubject.seeded(false); + // BehaviorSubject refreshLibrary = BehaviorSubject.seeded(false); BloomeeDBService bloomeeDBService = BloomeeDBService(); BloomeeDBCubit() : super(MediadbInitial()) { addNewPlaylistToDB(MediaPlaylistDB(playlistName: "Liked")); @@ -24,7 +24,7 @@ class BloomeeDBCubit extends Cubit { List _list = await getListOfPlaylists(); if (!_list.contains(mediaPlaylistDB.playlistName)) { BloomeeDBService.addPlaylist(mediaPlaylistDB); - refreshLibrary.add(true); + // refreshLibrary.add(true); if (!undo) { SnackbarService.showMessage( "Playlist ${mediaPlaylistDB.playlistName} added"); @@ -35,7 +35,7 @@ class BloomeeDBCubit extends Cubit { Future setLike(MediaItem mediaItem, {isLiked = false}) async { BloomeeDBService.addMediaItem(MediaItem2MediaItemDB(mediaItem), MediaPlaylistDB(playlistName: "Liked")); - refreshLibrary.add(true); + // refreshLibrary.add(true); BloomeeDBService.likeMediaItem(MediaItem2MediaItemDB(mediaItem), isLiked: isLiked); if (isLiked) { @@ -169,7 +169,7 @@ class BloomeeDBCubit extends Cubit { {bool undo = false}) async { BloomeeDBService.addMediaItem( MediaItem2MediaItemDB(mediaItemModel), mediaPlaylistDB); - refreshLibrary.add(true); + // refreshLibrary.add(true); if (!undo) { SnackbarService.showMessage( "${mediaItemModel.title} is added to ${mediaPlaylistDB.playlistName}!!"); @@ -220,7 +220,7 @@ class BloomeeDBCubit extends Cubit { @override Future close() async { - refreshLibrary.close(); + // refreshLibrary.close(); super.close(); } } diff --git a/lib/utils/load_Image.dart b/lib/utils/load_Image.dart index 9f87545..9f06a15 100644 --- a/lib/utils/load_Image.dart +++ b/lib/utils/load_Image.dart @@ -5,7 +5,7 @@ import 'package:Bloomee/theme_data/default.dart'; import 'package:http/http.dart' as http; Image loadImage(coverImageUrl, - {placeholderPath = "assets/icons/Bloomee_Logo.png"}) { + {placeholderPath = "assets/icons/bloomee_new_logo_c.png"}) { ImageProvider placeHolder = AssetImage(placeholderPath); return Image.network( coverImageUrl, @@ -96,7 +96,7 @@ CachedNetworkImage loadImageCached(coverImageURL, } Future getImageProvider(String imageUrl, - {String placeholderUrl = "assets/icons/Bloomee_Logo.png"}) async { + {String placeholderUrl = "assets/icons/bloomee_new_logo_c.png"}) async { if (imageUrl != "") { final response = await http.head(Uri.parse(imageUrl)); if (response.statusCode == 200) { diff --git a/lib/utils/pallete_generator.dart b/lib/utils/pallete_generator.dart index 269f977..1eb284f 100644 --- a/lib/utils/pallete_generator.dart +++ b/lib/utils/pallete_generator.dart @@ -4,7 +4,7 @@ import 'package:palette_generator/palette_generator.dart'; Future getPalleteFromImage(String url) async { ImageProvider placeHolder = - AssetImage("assets/icons/Bloomee_Logo.png"); + const AssetImage("assets/icons/bloomee_new_logo_c.png"); try { return (await PaletteGenerator.fromImageProvider( diff --git a/pubspec.yaml b/pubspec.yaml index 92bcdca..25bd90c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.2.1+0 +version: 2.3.0+0 environment: sdk: '>=3.0.6 <4.0.0' @@ -27,7 +27,7 @@ dependencies: sdk: flutter cupertino_icons: ^1.0.2 - # shared_preferences: ^2.2.2 + equatable: ^2.0.5 icons_plus: ^5.0.0 cached_network_image: ^3.2.3 flutter_bloc: ^8.1.3 @@ -59,6 +59,8 @@ dependencies: flutter_dotenv: ^5.1.0 package_info_plus: ^4.2.0 url_launcher: ^6.2.1 + flutter_displaymode: ^0.6.0 + connectivity_plus: ^5.0.2 share_plus: ^7.2.2 receive_sharing_intent: ^1.6.7 @@ -112,7 +114,6 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - - assets/icons/Bloomee_Logo.png - assets/.env - assets/icons/bloomee_new_logo_c.png