showStatusBar function

void showStatusBar(
  1. bool isShow
)

显示隐藏状态栏

Implementation

void showStatusBar(bool isShow) {
  if (isShow) {
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
        overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]);
  } else {
    //隐藏状态栏,保留底部按钮栏
    SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
        overlays: [SystemUiOverlay.bottom]); //隐藏状态栏,保留底部按钮栏
  }
}