列表滚动[关闭]时,Flutter-发行卡的边框将被删除

问题描述 投票:0回答:1
当滚动列表边框在卡片顶部被切掉时出现问题。我已经使用了stackchildlist。我在下面添加了代码。如果有人对这种类型的列表或问题有任何想法,请放弃您的建议。在此先谢谢您的问候>

@override Widget build(BuildContext context) { return Container( color: ColorsApp.black, child: CustomScrollView( slivers: colr .map( (color) => StackedListChild( minHeight: _minHeight, maxHeight: colr.indexOf(color) == colr.length - 1 ? MediaQuery .of(context) .size .height : _maxHeight, pinned: true, child: Center( child: new Container( height: 300.0, color: Colors.transparent, child: new Container( decoration: new BoxDecoration( color: Colors.green, borderRadius: new BorderRadius.only( topLeft: const Radius.circular(40.0), topRight: const Radius.circular(40.0), ) ), child: new Center( child: new Text("Hi modal sheet"), ) ), ), ), ), ) .toList(), ), );} Container myArtclesShimmer(int index) { return Container( margin: EdgeInsets.only(left:8), width: 65.0, height: 80.0, child: Shimmer.fromColors( baseColor: ColorsApp.ShimmerBackground, highlightColor: Colors.grey[300], enabled: true, child: Container( decoration: new BoxDecoration( shape: BoxShape.circle, color: ColorsApp.white), ), ) );}

Screenshot

enter image description here

当滚动列表边框在卡片顶部被切掉时出现问题。我已经使用了stackchildlist。我在下面添加了代码。如果有人对这种类型的列表或问题有任何想法,请删除您的...

flutter flutter-layout flutter-listview
1个回答
0
投票
用填充部件包装卡片部件
© www.soinside.com 2019 - 2024. All rights reserved.