containerWithCondition function

Widget containerWithCondition(
  1. Function? onBack,
  2. dynamic child
)

Implementation

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

  return WillPopScope(child: child, onWillPop: _willPopScopeCall);
}