小编Edm*_*man的帖子

CircularProgressIndicator 未显示在颤动中

我试图CircularProgressIndicator在单击按钮时在我的颤振应用程序中显示 ,但它不会呈现圆形进度条,但是一旦我更改代码以使用LinearProgressBar进度条,就没有任何问题。所以想知道是否有任何特殊设置需要显示循环加载指示器?

作品

if (_isFetching) {
  return new Scaffold(
    body: new Center(
      child: new SizedBox(
        width: 40.0,
        height: 40.0,
        child: const LinearProgressIndicator(backgroundColor: Colors.black)),
  ));
}
Run Code Online (Sandbox Code Playgroud)

不工作

if (_isFetching) {
  return new Scaffold(
    body: new Center(
      child: new SizedBox(
        width: 40.0,
        height: 40.0,
        child: const CircularProgressIndicator(backgroundColor: Colors.black)),
  ));
}
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
1
解决办法
6068
查看次数

Flutter - 禁用状态栏时,缺口区域为空白

这是我的应用程序的正常外观:

我想隐藏状态栏区域和底部导航栏,以便全屏显示图像。

  • 试过SystemChrome.setEnabledSystemUIOverlays([]); 状态栏区域被隐藏但状态栏有黑色或空白区域

  • 如果我设置 SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);

然后我得到与 [image1][1] 相同的结果

  • 如果我设置 SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);

我看到这个看起来很奇怪的导航栏,状态栏还在

  • 如果我设置 SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);

状态栏区域为黑色,出现导航栏

尝试有和没有安全区。仍然没有获得所需的全屏。

有什么办法可以使状态栏隐藏(不创建空白区域)并隐藏导航栏使图像全屏显示,即甚至利用缺口侧区域?

android dart flutter

3
推荐指数
2
解决办法
2410
查看次数

标签 统计

dart ×2

flutter ×2

android ×1