ale*_*ipa 0 flutter flutter-layout
我正在尝试实现这个modalBottomSheet
Stack我想与负面定位一起使用
showModalBottomSheet(
context: context,
builder: (context) {
return Stack(
alignment: AlignmentDirectional.bottomStart,
children: [
Container(
width: double.infinity,
height: 200,
color: Colors.white,
child: Column(//here there will be the text)
),
Positioned(
top: -20,
left: 0,
right: 0,
child: CircleAvatar(
backgroundColor: Palette.white,
radius: 38,
child: CircleAvatar(
backgroundImage: NetworkImage(snapshot.data.image),
radius: 34,
backgroundColor: Palette.white),
),
)]);
Run Code Online (Sandbox Code Playgroud)
然而,这切断了图片的顶部部分CircleAvatar(正如我所预期的那样)。
关于如何实施这个有什么想法吗?
您需要将堆栈上的clipBehavior更改为Clip.none
Stack(
clipBehavior: Clip.none,
...)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2049 次 |
| 最近记录: |