flutter - 删除 SliverAppBar 底部边框 - Flutter
问题描述
我想删除我在上图中突出显示的边框。我找不到任何解决方案来解决这个问题:(
这是我的 SliverAppBar 代码:
NestedScrollView(
headerSliverBuilder: (BuildContext ctx, isScrolled) {
return <Widget>[
SliverAppBar(
title: Text('Applying to this job opportunity'),
pinned: true,
titleSpacing: 0,
floating: true,
expandedHeight: 180,
flexibleSpace: //some widgets
)
]
}
)
解决方案
只需将elevation
属性设置为0
.
SliverAppBar(
title: Text('Applying to this job opportunity'),
pinned: true,
elevation: 0,
titleSpacing: 0,
floating: true,
expandedHeight: 180,
flexibleSpace: //some widgets
)
更多信息:https ://api.flutter.dev/flutter/material/SliverAppBar/elevation.html
推荐阅读
- ios - RxSwift - UIImageView - 观察属性 isHighlighted
- asp.net-core - 多对多关系 - 以 JSON 格式下载数据
- python - 通过 rs232 向投影仪发送 HEX 代码
- wpf - WPF:Microsoft.Practices.Prism.Events.IEventAggregator 与 CLR 事件
- java - 以网格的形式将数组添加到更大的数组中?
- deep-learning - 如何生成更小的 HDF5 文件?
- wpf - wpf FrameworkElement.width 动画
- mysql - 如何从另一个查询中获取 mySql 查询结果
- android - 如何在模拟器中配置端口
- javascript - 如何将类添加到动态创建的 DOM 元素或类中