From c998fa2906cb290cea930c64b54003b1ec63be98 Mon Sep 17 00:00:00 2001 From: Chinmay Patil <75988613+chinmay7016@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:28:24 +0530 Subject: [PATCH] Replaced deprecated WillPopScope with PopScope - I updated how we handle the back button in the app. - The old way was causing warnings and might not work in future updates, so we switched to a newer method called PopScope. - This change helps keep our code up-to-date and ensures things keep working smoothly in the future. --- lib/Pages/home_screen/home_screen.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Pages/home_screen/home_screen.dart b/lib/Pages/home_screen/home_screen.dart index f0cb01b..d4324e1 100644 --- a/lib/Pages/home_screen/home_screen.dart +++ b/lib/Pages/home_screen/home_screen.dart @@ -217,9 +217,7 @@ class _HomeScreenState extends State { final selectedTorrent = BlocProvider.of(context, listen: false); - return WillPopScope( - onWillPop: () => - onBackPressed(timeBackPressed, context), + return PopScope( child: Scaffold( appBar: AppBar( key: Key('AppBar $themeIndex'),