isShowingModalBottomSheet method
检测是否打开了 showModalBottomSheet 或 Dialog
Implementation
bool isShowingModalBottomSheet(BuildContext? context) {
if (context == null) {
return false;
}
return ModalRoute.of(context)?.isCurrent ?? false;
}
检测是否打开了 showModalBottomSheet 或 Dialog
bool isShowingModalBottomSheet(BuildContext? context) {
if (context == null) {
return false;
}
return ModalRoute.of(context)?.isCurrent ?? false;
}