diff --git a/lib/screens/screen/explore_screen.dart b/lib/screens/screen/explore_screen.dart index debae06..36a0292 100644 --- a/lib/screens/screen/explore_screen.dart +++ b/lib/screens/screen/explore_screen.dart @@ -1,8 +1,10 @@ import 'package:Bloomee/blocs/explore/cubit/explore_cubits.dart'; +import 'package:Bloomee/blocs/internet_connectivity/cubit/connectivity_cubit.dart'; import 'package:Bloomee/blocs/mediaPlayer/bloomee_player_cubit.dart'; import 'package:Bloomee/routes_and_consts/global_str_consts.dart'; import 'package:Bloomee/screens/screen/home_views/recents_view.dart'; import 'package:Bloomee/screens/widgets/more_bottom_sheet.dart'; +import 'package:Bloomee/screens/widgets/sign_board_widget.dart'; import 'package:Bloomee/screens/widgets/song_tile.dart'; import 'package:Bloomee/services/db/cubit/bloomee_db_cubit.dart'; import 'package:Bloomee/utils/app_updater.dart'; @@ -127,13 +129,29 @@ class _ExploreScreenState extends State { ), ), ), - BlocBuilder( + BlocBuilder( builder: (context, state) { return AnimatedSwitcher( duration: const Duration(milliseconds: 400), - child: state is YTMusicCubitInitial - ? const SizedBox() - : ytSection(state.ytmData), + child: switch (state) { + ConnectivityState.connected => + BlocBuilder( + builder: (context, state) { + return AnimatedSwitcher( + duration: const Duration(milliseconds: 400), + child: state is YTMusicCubitInitial + ? const SizedBox() + : ytSection(state.ytmData), + ); + }, + ), + ConnectivityState.disconnected => + const SignBoardWidget( + message: "No Internet Connection", + icon: MingCute.wifi_off_line, + ), + _ => const SizedBox() + }, ); }, ),