onBackPressed method
返回按钮点击 注意,如果是带有BasePage嵌套BasePage的情况,子BasePage需要override并不执行pop操作 以上提到的BasePage是指BasePage和BasePage的子类
Implementation
Future<bool> onBackPressed() async {
if (_context != null) {
_context?.pop();
return true;
}
return false;
}