これでいけるよ。
onWillPop.dart
Future<bool> _onWillPop() async {
final isFirstRouteInCurrentTab =
!await _navigatorKeys[_currentTab].currentState.maybePop();
if (isFirstRouteInCurrentTab) {
if (_currentTab != TabItem.home) {
_onSelect(TabItem.home);
return false;
}
}
return isFirstRouteInCurrentTab;
}
🥳