switchTab<T> method
跳转到 tabBar 页面,关闭其他所有非 tabBar 页面(等同 wx.switchTab) 清空路由栈后跳转到指定 tab 首页
Implementation
Future<T?> switchTab<T>(Widget tabPage) {
return Navigator.of(this).pushAndRemoveUntil<T>(
_slideRoute(tabPage),
(route) => false,
);
}