flutter - 如何在 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)),
)
],
),
)),
解决方案
我通过在应用栏使用工具栏高度找到了解决方案
推荐阅读
- c# - OracleParameter 使用大于定义大小的值
- c# - “复制”任务意外失败
- python - 具有不同功能的python多处理
- xamarin - 随图像尺寸变化的按钮定位
- angular - Angular2-JWT 包不再在 Angular 6 中工作(RXJS 导入问题)
- jquery - 需要用箭头键推进幻灯片放映图片
- python - Replace a line of a text file in python
- android - 如何在自定义 Listview 布局适配器中安排 Textview,放置在另一个 Textview 下方?添加了适配器支持
- c# - 从文件中读取随机行
- android - Phonegap App 在 PC 上检索数据,但在 Android 设备上不检索