Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 如何使用Appbar上的safearea?_Flutter - Fatal编程技术网

Flutter 如何使用Appbar上的safearea?

Flutter 如何使用Appbar上的safearea?,flutter,Flutter,所以我试图制作一个包含图像和文本的appbar,但是图像被裁剪了,因为我使用了安全区域小部件。有人知道解决办法吗?我试着用 底部:错误 在安全区窗口小部件 代码如下: title: SafeArea( bottom: false, child: Row( children: [ Container( height: deviceData.height * 0.05,

所以我试图制作一个包含图像和文本的appbar,但是图像被裁剪了,因为我使用了安全区域小部件。有人知道解决办法吗?我试着用

底部:错误

在安全区窗口小部件

代码如下:

 title: SafeArea(
          bottom: false,
          child: Row(
            children: [
              Container(
                height: deviceData.height * 0.05,
                width: deviceData.width * 0.10,
                decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(100),
                    image: DecorationImage(
                        image: NetworkImage(
                          "https://cdn.popbela.com/content-images/post/20190314/cover-526b71db133e78000df9ead475e858f1_750x500.png",
                        ),
                        fit: BoxFit.cover)),
              ),
              SizedBox(width: 10),
              Container(
                height: deviceData.height * 0.05,
                width: deviceData.width * 0.3,
                child: Text("Nadine Amizah",
                    style: GoogleFonts.poppins(
                        color: Colors.black,
                        fontSize: 15,
                        fontWeight: FontWeight.w500)),
              )
            ],
          ),
        )),

我通过在appbar上使用Toolbar height找到了解决方案,这可能会导致height:deviceData.height*0.10仍然不起作用