When we use below code after flutter version 3.12.0 we are getting deprecated message, what to use insted of this now?
WillPopScope(
onWillPop: () {
setStatusBarColor(statusBarColorPrimary,statusBarIconBrightness: Brightness.light);
finish(context);
return Future.value(true);
},)
2
Answers
After flutter version 3.12.0 pre WillPopScope is deprecated.
Now you can use PopScope as below
Any ideas how it use with this logic?