containerWithCondition function
Implementation
Widget containerWithCondition(Function? onBack, child) {
Future<bool> _willPopScopeCall() async {
onBack!();
return false;
}
return WillPopScope(child: child, onWillPop: _willPopScopeCall);
}