我有以下代码是不推荐使用的,现在我想在POPSCOPE中转换它.
WillPopScope(
onWillPop: () async {
bool canPop = true;
if (canPop) {
Navigator.of(context).pop("flag");
}
return canPop;
},
)
我想在POPSCOPE中转换上面的代码.