我有四个页面,没有选项卡栏。如果我想单击手机后退按钮以转到上一页。我没有解决办法。
答案 0 :(得分:0)
用Scaffold
和WillPopScop
来包装onWillPop
, return new WillPopScope(
onWillPop: (){
Navigator.pushReplacement(context,
new MaterialPageRoute(builder: (context) => MyHomePage()));
},
child : Scaffold( child : Center(child : Text('welcome to page 2 press back button to return to page 1 ') ),);
属性可以帮助您随意控制。
add_action('woocommerce_order_status_changed', 'function_test', 10, 3);
function function_test($id, $status_transition_from, $status_transition_to ) {
error_log("¡Done!", 0);
}
答案 1 :(得分:0)
我认为当用户按下“后退”按钮删除屏幕时,颤动管理是默认设置。然后您可以尝试一下。
Navigator.pop(context);
更多信息,请参见此链接。 https://medium.com/flutterpub/my-flutter-path-003-navigator-ad1472ff4e1a