【发布时间】:2019-01-20 21:01:18
【问题描述】:
我是 Flutter 开发的新手。谁能分享我如何在flutter 中禁用后按?
在Android中,我们可以使用onbackpressed方法。
@Override
public void onBackPressed() {
// super.onBackPressed(); commented this line in order to disable back press
//Write your code here
Toast.makeText(getApplicationContext(), "Back press disabled!", Toast.LENGTH_SHORT).show();
}
在flutter怎么可能呢?
【问题讨论】: